summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-10 07:39:54 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-10 07:39:54 +0000
commit6c504100f9396621dad2ff7b386c8157887ed0a4 (patch)
treed543916a368659cba776054160616092ec3f7128 /gcc/testsuite
parentf397ca89a463ba16c66e8db3b82a82256f834f8b (diff)
downloadgcc-6c504100f9396621dad2ff7b386c8157887ed0a4.tar.gz
PR rtl-optimization/36419
* combine-stack-adj.c (adjust_frame_related_expr): New function. (combine_stack_adjustments_for_block): Call it if needed. Delete correct insn. * dwarf2out.c (dwarf2out_frame_debug_expr): Adjust DW_CFA_GNU_args_size if CSA pass merged some adjustments into prologue sp adjustment. * g++.dg/eh/async-unwind1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/g++.dg/eh/async-unwind1.C61
2 files changed, 72 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7518595c775..3c153292307 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2008-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/36419
+ * g++.dg/eh/async-unwind1.C: New test.
+
+2008-07-10 Peter Maydell <pmaydell@chiark.greenend.org.uk>
+
+ PR other/28322
+ * gcc.dg/pr28322-2.c: Check that emitted diagnostic for -Wno-foobar
+ is a warning and not an error.
+
2008-07-09 Ian Lance Taylor <iant@google.com>
* gcc.dg/no-asm-1.c: New test.
diff --git a/gcc/testsuite/g++.dg/eh/async-unwind1.C b/gcc/testsuite/g++.dg/eh/async-unwind1.C
new file mode 100644
index 00000000000..69b2c345e75
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/async-unwind1.C
@@ -0,0 +1,61 @@
+// PR rtl-optimization/36419
+// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
+// { dg-options "-Os -fasynchronous-unwind-tables -mpreferred-stack-boundary=4" }
+
+extern "C" void abort ();
+
+int v = -1;
+unsigned int n;
+
+__attribute__((noinline, used))
+void foo (int a, int)
+{
+ if (v < 0)
+ v = ((unsigned long) &a) & 15;
+ else if ((((unsigned long) &a) & 15) != v)
+ abort ();
+ if (n++ == 0)
+ throw 1;
+}
+
+__attribute__((noinline, used))
+void baz (int a, int, int, int, int, int, int)
+{
+ if (v < 0)
+ v = ((unsigned long) &a) & 15;
+ else if ((((unsigned long) &a) & 15) != v)
+ abort ();
+ if (n++ == 0)
+ throw 1;
+}
+
+struct A { A () { }; ~A (); char c[24]; };
+
+__attribute__((noinline))
+A::~A ()
+{
+ asm volatile ("" : : : "memory");
+}
+
+__attribute__((noinline))
+void bar ()
+{
+ A a;
+ try
+ {
+ foo (1, 2);
+ baz (3, 4, 5, 6, 7, 8, 9);
+ }
+ catch (...)
+ {
+ }
+ foo (1, 2);
+ baz (3, 4, 5, 6, 7, 8, 9);
+}
+
+int
+main ()
+{
+ bar ();
+ return 0;
+}