diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 2008-07-23 10:28:06 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2008-07-23 10:28:06 +0000 |
commit | ab442df7fb453434d80a779844fe1a10c0c802ab (patch) | |
tree | efd8e61a3d2ff9dcff5eb5bf03e25922191f7df5 /gcc/testsuite/gcc.target/i386/funcspec-4.c | |
parent | 5295185c3150a8d31685dc44248aa058246bbe73 (diff) | |
download | gcc-ab442df7fb453434d80a779844fe1a10c0c802ab.tar.gz |
Add ability to set target options (ix86 only) and optimization options on a function specific basis
From-SVN: r138075
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/funcspec-4.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/funcspec-4.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-4.c b/gcc/testsuite/gcc.target/i386/funcspec-4.c new file mode 100644 index 00000000000..71251c314bb --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/funcspec-4.c @@ -0,0 +1,14 @@ +/* Test some error conditions with function specific options. */ +/* { dg-do compile } */ + +/* no sse500 switch */ +extern void error1 (void) __attribute__((__option__("sse500"))); /* { dg-error "unknown" } */ + +/* Multiple arch switches */ +extern void error2 (void) __attribute__((__option__("arch=core2,arch=k8"))); /* { dg-error "already specified" } */ + +/* Unknown tune target */ +extern void error3 (void) __attribute__((__option__("tune=foobar"))); /* { dg-error "bad value" } */ + +/* option on a variable */ +extern int error4 __attribute__((__option__("sse2"))); /* { dg-warning "ignored" } */ |