aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-07-18 06:54:23 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-07-18 06:54:23 +0000
commit97f132350479327123dc157b66c8a2a2fddeacfd (patch)
tree651776caf747045f78b75be03dff8073b074b7e9 /gcc
parentdf6a7b9d37edc1da49c5eec4963b7df3e3781d7a (diff)
downloadgcc-97f132350479327123dc157b66c8a2a2fddeacfd.zip
gcc-97f132350479327123dc157b66c8a2a2fddeacfd.tar.gz
gcc-97f132350479327123dc157b66c8a2a2fddeacfd.tar.bz2
re PR debug/86523 (ICE in gen_member_die, at dwarf2out.c:24933 starting from r262560)
2018-07-18 Richard Biener <rguenther@suse.de> PR debug/86523 cp/ * decl2.c (c_parse_final_cleanups): Call write_out_vars before start_static_storage_duration_function sets current_function_decl. * g++.dg/lto/pr86523-3_0.C: New testcase. From-SVN: r262849
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl2.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/lto/pr86523-3_0.C24
4 files changed, 38 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f6f4398..7161565 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2018-07-18 Richard Biener <rguenther@suse.de>
+
+ PR debug/86523
+ * decl2.c (c_parse_final_cleanups): Call write_out_vars before
+ start_static_storage_duration_function sets current_function_decl.
+
2018-07-17 Jason Merrill <jason@redhat.com>
PR c++/86480 - nested variadic lambda and constexpr if.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index f8fc20e..d67ced0 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -4754,14 +4754,14 @@ c_parse_final_cleanups (void)
inline, with resulting performance improvements. */
tree ssdf_body;
+ /* Make sure the back end knows about all the variables. */
+ write_out_vars (vars);
+
/* Set the line and file, so that it is obviously not from
the source file. */
input_location = locus_at_end_of_parsing;
ssdf_body = start_static_storage_duration_function (ssdf_count);
- /* Make sure the back end knows about all the variables. */
- write_out_vars (vars);
-
/* First generate code to do all the initializations. */
if (vars)
do_static_initialization_or_destruction (vars, /*initp=*/true);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b099439..7fc2a42 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-18 Richard Biener <rguenther@suse.de>
+
+ PR debug/86523
+ * g++.dg/lto/pr86523-3_0.C: New testcase.
+
2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
* gcc.target/m68k/mulsi_highpart.c: New test.
diff --git a/gcc/testsuite/g++.dg/lto/pr86523-3_0.C b/gcc/testsuite/g++.dg/lto/pr86523-3_0.C
new file mode 100644
index 0000000..31063b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr86523-3_0.C
@@ -0,0 +1,24 @@
+// { dg-lto-do link }
+// { dg-require-effective-target fpic }
+// { dg-require-effective-target shared }
+// { dg-lto-options { { -fPIC -flto -g -shared } } }
+class a {
+ int b;
+};
+int const c = 0, d = 1, f = 2, g = 3;
+struct B {
+ typedef a h;
+ h i;
+};
+template <class> B j();
+template <class> struct k_context { static B const e_missingvar; };
+template <class l> B const k_context<l>::e_missingvar = j<l>();
+inline B m() {
+ switch (0) {
+ case c:
+ case d:
+ return k_context<int>::e_missingvar;
+ case f:
+ case g:;
+ }
+}