Add check_effective_target_maybe_x32
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 3 Nov 2012 21:36:48 +0000 (14:36 -0700)
committerH.J. Lu <hjl@gcc.gnu.org>
Sat, 3 Nov 2012 21:36:48 +0000 (14:36 -0700)
* lib/target-supports.exp (check_effective_target_maybe_x32): New
proc.
* gcc.target/i386/pr54457.c: Use dg-require-effective-target
maybe_x32.
* gcc.target/i386/pr53249.c: Likewise.

Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu>
From-SVN: r193126

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr53249.c
gcc/testsuite/gcc.target/i386/pr54457.c
gcc/testsuite/lib/target-supports.exp

index cfccf7f60c6db6b598a88f2c744161d37b5fedaa..1dcecbf9d0a3390c0b121a380403f90dde5641d5 100644 (file)
@@ -1,3 +1,12 @@
+2012-11-03  H.J. Lu  <hjl.tools@gmail.com>
+           Jack Howarth  <howarth@bromo.med.uc.edu>
+
+       * lib/target-supports.exp (check_effective_target_maybe_x32): New
+       proc.
+       * gcc.target/i386/pr54457.c: Use dg-require-effective-target
+       maybe_x32.
+       * gcc.target/i386/pr53249.c: Likewise.
+
 2012-11-03  Andrew Pinski  <apinski@cavium.com>
 
         * gcc.target/mips/octeon-bbit-3.c: Change the second call to abort to
index 9eab8bc135be1f68f4c693558b59e84de0afc446..c41d3e9ededd278920eb4a87988ab84a28047bee 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-O2 -mx32 -ftls-model=initial-exec -maddress-mode=short" } */
 
 struct gomp_task
index d27f899fd5a74f45a004dce643c430c85cab1159..9abfbd32025ffa69e6090ced00e0c8b67a272d54 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-O2 -mx32 -maddress-mode=short" } */
 
 extern char array[40];
index 8520c8f5507640591c1b23707a3f21886f4fdb6b..86ac8a975bd4c8a352f8b414da08800a0569c8a3 100644 (file)
@@ -4608,6 +4608,14 @@ proc check_effective_target_lto { } {
     return [info exists ENABLE_LTO]
 }
 
+# Return 1 if -mx32 -maddress-mode=short can compile, 0 otherwise.
+
+proc check_effective_target_maybe_x32 { } {
+    return [check_no_compiler_messages maybe_x32 object {
+        void foo (void) {}
+    } "-mx32 -maddress-mode=short"]
+}
+
 # Return 1 if this target supports the -fsplit-stack option, 0
 # otherwise.