aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2025-03-05 14:24:50 +0100
committerRichard Biener <rguenth@gcc.gnu.org>2025-03-18 10:12:28 +0100
commit99a3f013c3bb8bc022ca488b40aa18fd97b5224d (patch)
tree4ecdacca75aedda5cd50254583c62227891e9cea /gcc/testsuite
parent289867bb298507d7c99a30f92d650a86df99225f (diff)
downloadgcc-99a3f013c3bb8bc022ca488b40aa18fd97b5224d.zip
gcc-99a3f013c3bb8bc022ca488b40aa18fd97b5224d.tar.gz
gcc-99a3f013c3bb8bc022ca488b40aa18fd97b5224d.tar.bz2
debug/101533 - ICE with variant typedef DIE generation
There's a sanity check in gen_type_die_with_usage that trips unnecessarily for a case where the relevant DIE has already been generated successfully in other ways. The following keys the existing TREE_ASM_WRITTEN check on the correct object, honoring this and does nothing instead of ICEing for the testcase at hand. PR debug/101533 * dwarf2out.cc (gen_type_die_with_usage): When we have output the typedef already do nothing for a typedef variant. Do not set TREE_ASM_WRITTEN on the type. * g++.dg/debug/pr101533.C: New testcase.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/g++.dg/debug/pr101533.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/debug/pr101533.C b/gcc/testsuite/g++.dg/debug/pr101533.C
new file mode 100644
index 0000000..fc1e2e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr101533.C
@@ -0,0 +1,11 @@
+// { dg-do compile }
+// { dg-options "-g" }
+
+template <typename> class T
+{
+ typedef struct {} a __attribute__((aligned));
+};
+void f ()
+{
+ T<int>();
+}