tree.c (fld_simplified_type): Temporarily disable array simplification.
authorJan Hubicka <hubicka@ucw.cz>
Mon, 24 Dec 2018 11:21:25 +0000 (12:21 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 24 Dec 2018 11:21:25 +0000 (11:21 +0000)
* tree.c (fld_simplified_type): Temporarily disable array
simplification.

* gcc.c-torture/pr88140.c: New testcase.

From-SVN: r267398

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/pr88140.c [new file with mode: 0644]
gcc/tree.c

index 77631ac9a21d919f9d05e4813a73111e7e5a0134..dce70c8063486439a2f6ee5d0b189f2e55c02880 100644 (file)
@@ -1,3 +1,9 @@
+2018-12-24  Jan Hubicka  <hubicka@ucw.cz>
+       
+       PR lto/88140
+       * tree.c (fld_simplified_type): Temporarily disable array
+       simplification.
+
 2018-12-24  Jan Hubicka  <hubicka@ucw.cz>
 
        * lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
index 933b716b9f9a276060ab32052910fe733a942249..6cd73cc9775935f5e6e00229b57c552f228f9deb 100644 (file)
@@ -1,3 +1,8 @@
+2018-12-24  Jan Hubicka  <hubicka@ucw.cz>
+       
+       PR lto/88140
+       * gcc.c-torture/pr88140.c: New testcase.
+
 2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>
 
        PR testsuite/67974
diff --git a/gcc/testsuite/gcc.c-torture/pr88140.c b/gcc/testsuite/gcc.c-torture/pr88140.c
new file mode 100644 (file)
index 0000000..a08c2cb
--- /dev/null
@@ -0,0 +1,19 @@
+typedef struct {
+} a;
+
+typedef struct {
+  a *b[0];
+} c;
+
+void d() { ((c *)0)->b[0] = 0; }
+
+typedef struct {
+} a;
+
+typedef struct {
+  a *b[0];
+} c;
+
+void d() { ((c *)0)->b[0] = 0; }
+
+
index c3d4bb8a00a286c2aada4e44ef656ceb552c6d63..5fd3be1e1f3d6abd359e9eb35ece40d7419be450 100644 (file)
@@ -5372,7 +5372,8 @@ fld_simplified_type (tree t, struct free_lang_data_d *fld)
     return t;
   if (POINTER_TYPE_P (t))
     return fld_incomplete_type_of (t, fld);
-  if (TREE_CODE (t) == ARRAY_TYPE)
+  /* FIXME: This triggers verification error, see PR88140.  */
+  if (TREE_CODE (t) == ARRAY_TYPE && 0)
     return fld_process_array_type (t, fld_simplified_type (TREE_TYPE (t), fld),
                                   fld_simplified_types, fld);
   return t;