summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-23 16:55:56 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-23 16:55:56 +0000
commit9797ae2966d1e466585ecdaa590ba297f8f699fb (patch)
tree87edab2218262e4b2334682a97b0ab395b508804 /gcc/testsuite
parent5bb6976b67312dc266f41042354cdeea13a2f5f4 (diff)
downloadgcc-9797ae2966d1e466585ecdaa590ba297f8f699fb.tar.gz
PR c++/54988
* decl2.c (cplus_decl_attributes): Don't return early if attributes is NULL. * c-c++-common/pr54988.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192722 138bc75d-0d04-0410-961f-82ee72b054a4
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);
+}