stackalign.exp: Combine stack alignment torture options with usual torture options.
authorJanis Johnson <janisjo@codesourcery.com>
Tue, 12 Jun 2012 20:27:49 +0000 (20:27 +0000)
committerJanis Johnson <janis@gcc.gnu.org>
Tue, 12 Jun 2012 20:27:49 +0000 (20:27 +0000)
* gcc.dg/torture/stackalign/stackalign.exp: Combine stack
alignment torture options with usual torture options.
* gcc.dg/torture/stackalign/alloca-2.c: Use dg-additional-options
instead of dg-options.
* gcc.dg/torture/stackalign/alloca-3.c: Likewise.
* gcc.dg/torture/stackalign/alloca-4.c: Likewise.
* gcc.dg/torture/stackalign/alloca-5.c: Likewise.
* gcc.dg/torture/stackalign/alloca-6.c: Likewise.
* gcc.dg/torture/stackalign/push-1.c: Likewise.
* gcc.dg/torture/stackalign/vararg-3.c: Likewise.

From-SVN: r188481

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/stackalign/alloca-2.c
gcc/testsuite/gcc.dg/torture/stackalign/alloca-3.c
gcc/testsuite/gcc.dg/torture/stackalign/alloca-4.c
gcc/testsuite/gcc.dg/torture/stackalign/alloca-5.c
gcc/testsuite/gcc.dg/torture/stackalign/alloca-6.c
gcc/testsuite/gcc.dg/torture/stackalign/push-1.c
gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
gcc/testsuite/gcc.dg/torture/stackalign/vararg-3.c

index 1ebf9ba2b4a225eefb89268c725dca6cabe0e533..2f7f3f18abad02c0bd9ed4fa14913d2b4c2bbbb7 100644 (file)
@@ -1,5 +1,16 @@
 2012-06-12  Janis Johnson  <janisjo@codesourcery.com>
 
+       * gcc.dg/torture/stackalign/stackalign.exp: Combine stack
+       alignment torture options with usual torture options.
+       * gcc.dg/torture/stackalign/alloca-2.c: Use dg-additional-options
+       instead of dg-options.
+       * gcc.dg/torture/stackalign/alloca-3.c: Likewise.
+       * gcc.dg/torture/stackalign/alloca-4.c: Likewise.
+       * gcc.dg/torture/stackalign/alloca-5.c: Likewise.
+       * gcc.dg/torture/stackalign/alloca-6.c: Likewise.
+       * gcc.dg/torture/stackalign/push-1.c: Likewise.
+       * gcc.dg/torture/stackalign/vararg-3.c: Likewise.
+
        * gcc.target/arm/di-longlong64-sync-withhelpers.c: Add comments
        to checks for multiple messages reported for one line of source code.
        * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise.
index 744d72aa5419a3de0426c5c78fb73d68c68f9cc2..2ef17629d7b13fdce21d7c26c8b67da8c2104bb2 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/37009 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
-/* { dg-options "-msse2" } */
+/* { dg-additional-options "-mmmx -msse2" } */
 /* { dg-require-effective-target sse2_runtime } */
 
 #include <emmintrin.h>
index 31cb0c472b548765081116b88fb9f9596e913953..c3dd12479a24cdcdfce5cb5969e890f54651d0c3 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/37009 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-options "-msse2" } */
+/* { dg-additional-options "-mmmx -msse2" } */
 /* { dg-require-effective-target sse2_runtime } */
 
 #include <emmintrin.h>
index b23fdf646259d771fad7b67db57d1e0770c088f6..bc16f5789035cc3d83cdb56f232bf9e0bd36d0fb 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/37009 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
-/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
+/* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
 
 #include "check.h"
 
index 7b7ed686fb503a494f1d2784dfd7b8e4fee66c30..4c6506d1ab17f6adefaf4c6dc651f7e614a92de3 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/45234 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
-/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
+/* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
 
 #include "check.h"
 
index 24c8e5a6e925151c42ec5d49db085b47cc2f7ee3..301fff7a202f3ce4794e8a5841181f83b8fc164b 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/45234 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
-/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
+/* { dg-additional-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
 
 #include "check.h"
 
index 787f99fc6dc43e8bcefb363fbc6d46a8ad395c15..c23faf411c48a04526a4e1f2c6798dc264c3560f 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/37010 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
-/* { dg-options "-msse2 -mpreferred-stack-boundary=2" } */
+/* { dg-additional-options "-mmmx -msse2 -mpreferred-stack-boundary=2" } */
 /* { dg-require-effective-target sse2_runtime } */
 
 #include <emmintrin.h>
index a975c6b5212d28dc0841378e3cd0692e578b9156..dafac8de18e67189e12bc36ddef54301fe330d11 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2008, 2010
+# Copyright (C) 2008, 2010, 2012
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # This harness is for tests that should be run at all optimisation levels.
 
 load_lib gcc-dg.exp
+load_lib torture-options.exp
 
-set additional_flags ""
+global DG_TORTURE_OPTIONS LTO_TORTURE_OPTIONS
+
+dg-init
+torture-init
+
+# default_flags are replaced by a dg-options test directive, or appended
+# to by using dg-additional-options.  Use default_flags for options that
+# are used in all of the torture sets to limit the amount of noise in
+# test summaries.
+set default_flags ""
+
+# torture_flags are combined with other torture options and do not
+# affect options specified within a test.
+set torture_flags ""
+
+set stackalign_options [list]
 if { [check_effective_target_automatic_stack_alignment] } then {
-    lappend additional_flags "-mstackrealign"
-    lappend additional_flags "-mpreferred-stack-boundary=5"
+    append default_flags " -mstackrealign"
+    append default_flags " -mpreferred-stack-boundary=5"
 }
 if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
-    lappend additional_flags "-mno-mmx"
+    append default_flags " -mno-mmx"
 }
+lappend stackalign_options [join $torture_flags]
 
-dg-init
-
-gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $additional_flags
 if { [check_effective_target_fpic] } then {
-    set pic_additional_flags $additional_flags
-    lappend pic_additional_flags "-fpic"
-    gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $pic_additional_flags
+    set pic_torture_flags $torture_flags
+    append pic_torture_flags " -fpic"
+    lappend stackalign_options [join $pic_torture_flags]
 }
 
 if { [check_effective_target_automatic_stack_alignment] } then {
-    lappend additional_flags "-mforce-drap"
-    gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $additional_flags
+    append torture_flags " -mforce-drap"
+    lappend stackalign_options [join $torture_flags]
     if { [check_effective_target_fpic] } then {
-       set pic_additional_flags $additional_flags
-       lappend pic_additional_flags "-fpic"
-       gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] $pic_additional_flags
+       set pic_torture_flags $torture_flags
+       append pic_torture_flags " -fpic"
+       lappend stackalign_options [join $pic_torture_flags]
     }
 }
 
+# Combine stackalign options with the usual torture optimization flags.
+set-torture-options [concat $DG_TORTURE_OPTIONS $LTO_TORTURE_OPTIONS] $stackalign_options
+
+gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] "$default_flags"
+
+torture-finish
 dg-finish
index 5b49685fa82c2d9dcdb44897be6be30de988d229..baf398c12e7e2f2795790c90125f1443572189fa 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/37009 */
 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
-/* { dg-options "-msse2" } */
+/* { dg-additional-options "-mmmx -msse2" } */
 /* { dg-require-effective-target sse2_runtime } */
 
 #include <stdarg.h>