summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/c-c++-common/pr54988.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ddfef9753f1..76f0f423bb9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54988
+ * c-c++-common/pr54988.c: New test.
+
2012-10-23 Jan Hubicka <jh@suse.cz>
* gcc.dg/tree-prof/peel-1.c: New testcase.
diff --git a/gcc/testsuite/c-c++-common/pr54988.c b/gcc/testsuite/c-c++-common/pr54988.c
new file mode 100644
index 00000000000..59406d6ab24
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr54988.c
@@ -0,0 +1,20 @@
+/* PR c++/54988 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
+
+#if defined(__i386__) || defined(__x86_64__)
+#pragma GCC target "fpmath=sse"
+#endif
+
+static inline __attribute__ ((always_inline)) int
+foo (int x)
+{
+ return x;
+}
+
+int
+bar (int x)
+{
+ return foo (x);
+}