summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-26 19:05:26 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-26 19:05:26 +0000
commit6e1e0aa6995813be6d54878c075453d6c283c0f9 (patch)
tree1b047e09d20c790b04c70b61dd892a3fc628d0c2 /gcc/testsuite
parent359e4f59ff4a4932702a5ee3b3d7f64abf87ab92 (diff)
downloadppe42-gcc-6e1e0aa6995813be6d54878c075453d6c283c0f9.tar.gz
ppe42-gcc-6e1e0aa6995813be6d54878c075453d6c283c0f9.zip
* dwarf2out.c (gen_inlined_subroutine_die): If block is abstract,
generate a die for the lexical block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50056 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/debug/20020224-1.c60
2 files changed, 64 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d0790f59710..8505241abef 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-26 Alexandre Oliva <aoliva@redhat.com>
+
+ * gcc.dg/debug/20020224-1.c: New.
+
2002-02-25 Kazu Hirata <kazu@hxi.com>
* gcc.c-torture/execute/960416-1.x: New.
diff --git a/gcc/testsuite/gcc.dg/debug/20020224-1.c b/gcc/testsuite/gcc.dg/debug/20020224-1.c
new file mode 100644
index 00000000000..c61a17aed10
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/20020224-1.c
@@ -0,0 +1,60 @@
+/* { dg-do compile } */
+
+/* Here's the deal: f3 is not inlined because it's too big, but f2 and
+ f1 are inlined into it. We used to fail to emit debugging info for
+ t1, because it was moved inside the (inlined) block of f1, marked
+ as abstract, then we'd crash. */
+
+#define UNUSED __attribute__((unused))
+#define EXT __extension__
+
+int undef(void);
+
+inline static void
+f1 (int i UNUSED)
+{
+}
+
+inline static void
+f2 (void)
+{
+ f1 (EXT ({ int t1 UNUSED; undef (); }));
+}
+
+inline static void
+f3 (void)
+{
+ int v1 UNUSED;
+ int v2 UNUSED;
+
+ EXT ({ int t2 UNUSED; if (0) undef (); 0; })
+ && EXT ({ int t3 UNUSED; if (0) undef (); 0; });
+
+ if (1)
+ {
+ undef ();
+ if (1)
+ f2 ();
+ }
+
+ {
+ undef ();
+ }
+}
+
+inline static void
+f4 (void)
+{
+ EXT ({ undef (); 1; }) && EXT ({ int t4 UNUSED = ({ 1; }); 1; });
+
+ { }
+
+ EXT ({ int t5 UNUSED; if (0) undef (); 0; });
+
+ f4 ();
+
+ undef ();
+ f3 ();
+
+ return;
+}
OpenPOWER on IntegriCloud