On 06/11/2012 12:35 PM, H.J. Lu wrote:
> On Mon, Jun 11, 2012 at 12:21 PM, Janis Johnson
> <janis_john...@mentor.com> wrote:
>> On 06/11/2012 12:15 PM, H.J. Lu wrote:
>>> On Mon, Jun 11, 2012 at 12:00 PM, Janis Johnson
>>> <janis_john...@mentor.com> wrote:
>>>> The tests in gcc.dg/torture/stackalign use two sets of torture options:
>>>> the usual optimization sets used as default for torture tests, and up to
>>>> four sets of options that are specific to stack alignment.  The stack
>>>> alignment options are passed via an option that is used by the dg-test
>>>> option dg_extra_tool_flags, which can be overridden by dg-options.  This
>>>> means that the seven tests in that test directory that use dg-option do
>>>> not use the other alignment options.  All seven of these tests are
>>>> limited to x86 targets.  Four of them use -msse2, and four use different
>>>> values for -mpreferred-stack-boundary (one does both), so it doesn't
>>>> look as if they are intended to use the four sets of stackalign torture
>>>> options.
>>>>
>>>> This patch moves those seven tests out of the stackalign directory up to
>>>> the general gcc.dg/torture directory.  With them out of the way I'll be
>>>> able to use clean up the remaining stackalign tests to use torture test
>>>> support to combine the stack align options with other torture options so
>>>> they'll show up in test summary lines, eliminating lots of duplicate
>>>> lines in test summaries.
>>>>
>>>> Tested on i686-pc-linux-gnu and arm-none-eabi.  OK for mainline?
>>>>
>>>> 2012-06-11  Janis Johnson  <jani...@codesourcery.com>
>>>>
>>>>        * gcc.dg/torture/stackalign/alloca-2.c: Move to ...
>>>>        * gcc.dg/torture/alloca-2.c: ... here.
>>>>        * gcc.dg/torture/stackalign/alloca-3.c: Move to ...
>>>>        * gcc.dg/torture/alloca-3.c: ... here.
>>>>        * gcc.dg/torture/stackalign/alloca-4.c: Move to ...
>>>>        * gcc.dg/torture/alloca-4.c: ... here.
>>>>        * gcc.dg/torture/stackalign/alloca-5.c: Move to ...
>>>>        * gcc.dg/torture/alloca-5.c: ... here.
>>>>        * gcc.dg/torture/stackalign/alloca-6.c: Move to ...
>>>>        * gcc.dg/torture/alloca-6.c: ... here.
>>>>        * gcc.dg/torture/stackalign/push-1.c: Move to ...
>>>>        * gcc.dg/torture/push-1.c: ... here.
>>>>        * gcc.dg/torture/stackalign/vararg-3.c: Move to ...
>>>>        * gcc.dg/torture/vararg-3.c: ... here.
>>>
>>> stackalign.exp has
>>>
>>> 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
>>> }
>>>
>>> It adds PIC tests.  Will this change remove PIC tests?
>>>
>>>
>>
>> The options for PIC tests are overridden by dg-options.  This change
>> will make no difference at all to how these 7 tests are compiled.
>> They are currently compiled four times with exactly the same options.
>>
> 
> That doesn't match what I see on trunk as of yesterday:
> 
> Executing on host:
> /export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
> -B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/
> /export/gnu/import/git/gcc/gcc/testsuite/gcc.dg/torture/stackalign/comp-goto-1.c
>  -fno-diagnostics-show-caret   -O0  -mstackrealign
> -mpreferred-stack-boundary=5 -mno-mmx  -lm   -o ./comp-goto-1.exe
> (timeout = 300)
> 
> Not only stackalign.exp adds -fpic, it also adds -mforce-drap,
> -mstackrealign, -mpreferred-stack-boundary=5 and
> -mno-mmx.

Your example uses comp-goto-1.c which uses the four sets of stack
alignment options as intended.  That isn't the case for the 7
tests that use dg-options; try one of those.

I plan to modify stackalign.exp so that the stackalign options
will be treated as torture options and be reported in test summaries
to make each line in a test summary unique, with the goal of running
the tests with the same sets of options that are used now.

Janis

Reply via email to