From: Richard Biener Date: Mon, 25 Jan 2016 09:31:47 +0000 (+0000) Subject: re PR lto/69393 (ICE in dwarf2out_finish, at dwarf2out.c:27175 with LTO) X-Git-Tag: upstream/12.2.0~49227 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02ef53f28854628ee15784bf860e7db24427a18f;p=platform%2Fupstream%2Fgcc.git re PR lto/69393 (ICE in dwarf2out_finish, at dwarf2out.c:27175 with LTO) 2016-01-25 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f102049..8a9798d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2016-01-25 Richard Biener + 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 + PR tree-optimization/69376 * tree-ssa-sccvn.h (struct vn_ssa_aux): Add range_info_anti_range_p flag. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index c657866..d8ca1b7 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -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) diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 1da01e2..3c8558e 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -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 diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index f9272d6..42281a5 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -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 diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index b7f2b6d..818d994 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2016-01-25 Richard Biener + + PR lto/69393 + * testsuite/libgomp.c++/pr69393.C: New testcase. + 2016-01-22 Ilya Verbin * 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 index 0000000..e3f0de1 --- /dev/null +++ b/libgomp/testsuite/libgomp.c++/pr69393.C @@ -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; +}