]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc.dg/i386-regparm.c: New.
authorMichael Matz <matz@suse.de>
Wed, 25 Feb 2004 00:48:23 +0000 (00:48 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Wed, 25 Feb 2004 00:48:23 +0000 (00:48 +0000)
From-SVN: r78412

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/i386-regparm.c [new file with mode: 0644]

index 160926aa8589cd6485e7541ef26dfe1f279bdb53..dcfb7ba08b176a71918193e703645a624467ae7b 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-24  Michael Matz  <matz@suse.de>
+
+       * gcc.dg/i386-regparm.c: New.
+
 2004-02-23  James E Wilson  <wilson@specifixinc.com>
 
        * gcc.c-torture/execute/20040223-1.c: New.
diff --git a/gcc/testsuite/gcc.dg/i386-regparm.c b/gcc/testsuite/gcc.dg/i386-regparm.c
new file mode 100644 (file)
index 0000000..18206ea
--- /dev/null
@@ -0,0 +1,9 @@
+/* { dg-do compile { target i?86-*-* } } */
+/* { dg-options "-W -Wall" } */
+
+/* Verify that GCC correctly detects non-matching regparm attributes.  */
+int __attribute__((regparm(3))) f (void);  /* { dg-error "previous" } */
+
+int __attribute__((regparm(2))) f (void) { /* { dg-error "conflicting" } */
+  return 0;
+}