re PR lto/69393 (ICE in dwarf2out_finish, at dwarf2out.c:27175 with LTO)
authorRichard Biener <rguenther@suse.de>
Mon, 25 Jan 2016 09:31:47 +0000 (09:31 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 25 Jan 2016 09:31:47 +0000 (09:31 +0000)
2016-01-25  Richard Biener  <rguenther@suse.de>

PR lto/69393
* dwarf2out.c (is_naming_typedef_decl): Not when DECL_NAMELESS.
* tree-streamer-out.c (pack_ts_base_value_fields): Stream
DECL_NAMELESS.
* tree-streamer-in.c (unpack_ts_base_value_fields): Likewise.

* testsuite/libgomp.c++/pr69393.C: New testcase.

From-SVN: r232787

gcc/ChangeLog
gcc/dwarf2out.c
gcc/tree-streamer-in.c
gcc/tree-streamer-out.c
libgomp/ChangeLog
libgomp/testsuite/libgomp.c++/pr69393.C [new file with mode: 0644]

index f102049..8a9798d 100644 (file)
@@ -1,5 +1,13 @@
 2016-01-25  Richard Biener  <rguenther@suse.de>
 
+       PR lto/69393
+       * dwarf2out.c (is_naming_typedef_decl): Not when DECL_NAMELESS.
+       * tree-streamer-out.c (pack_ts_base_value_fields): Stream
+       DECL_NAMELESS.
+       * tree-streamer-in.c (unpack_ts_base_value_fields): Likewise.
+
+2016-01-25  Richard Biener  <rguenther@suse.de>
+
        PR tree-optimization/69376
        * tree-ssa-sccvn.h (struct vn_ssa_aux): Add range_info_anti_range_p
        flag.
index c657866..d8ca1b7 100644 (file)
@@ -23094,6 +23094,7 @@ is_naming_typedef_decl (const_tree decl)
 {
   if (decl == NULL_TREE
       || TREE_CODE (decl) != TYPE_DECL
+      || DECL_NAMELESS (decl)
       || !is_tagged_type (TREE_TYPE (decl))
       || DECL_IS_BUILTIN (decl)
       || is_redundant_typedef (decl)
index 1da01e2..3c8558e 100644 (file)
@@ -116,7 +116,10 @@ unpack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
   TREE_ADDRESSABLE (expr) = (unsigned) bp_unpack_value (bp, 1);
   TREE_THIS_VOLATILE (expr) = (unsigned) bp_unpack_value (bp, 1);
   if (DECL_P (expr))
-    DECL_UNSIGNED (expr) = (unsigned) bp_unpack_value (bp, 1);
+    {
+      DECL_UNSIGNED (expr) = (unsigned) bp_unpack_value (bp, 1);
+      DECL_NAMELESS (expr) = (unsigned) bp_unpack_value (bp, 1);
+    }
   else if (TYPE_P (expr))
     TYPE_UNSIGNED (expr) = (unsigned) bp_unpack_value (bp, 1);
   else
index f9272d6..42281a5 100644 (file)
@@ -87,7 +87,10 @@ pack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
   bp_pack_value (bp, TREE_ADDRESSABLE (expr), 1);
   bp_pack_value (bp, TREE_THIS_VOLATILE (expr), 1);
   if (DECL_P (expr))
-    bp_pack_value (bp, DECL_UNSIGNED (expr), 1);
+    {
+      bp_pack_value (bp, DECL_UNSIGNED (expr), 1);
+      bp_pack_value (bp, DECL_NAMELESS (expr), 1);
+    }
   else if (TYPE_P (expr))
     bp_pack_value (bp, TYPE_UNSIGNED (expr), 1);
   else
index b7f2b6d..818d994 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-25  Richard Biener  <rguenther@suse.de>
+
+       PR lto/69393
+       * testsuite/libgomp.c++/pr69393.C: New testcase.
+
 2016-01-22  Ilya Verbin  <ilya.verbin@intel.com>
 
        * target.c (gomp_get_target_fn_addr): Allow host fallback if target
diff --git a/libgomp/testsuite/libgomp.c++/pr69393.C b/libgomp/testsuite/libgomp.c++/pr69393.C
new file mode 100644 (file)
index 0000000..e3f0de1
--- /dev/null
@@ -0,0 +1,16 @@
+// { dg-do run }
+// { dg-require-effective-target lto }
+// { dg-options "-flto -g -fopenmp" }
+
+int e = 5;
+
+int
+main ()
+{
+  int a[e];
+  a[0] = 6;
+#pragma omp parallel
+  if (a[0] != 6)
+    __builtin_abort ();
+  return 0;
+}