on 2022/9/3 01:36, Segher Boessenkool wrote:
> On Fri, Sep 02, 2022 at 08:50:52AM +0800, Kewen.Lin wrote:
>> on 2022/9/1 22:57, Segher Boessenkool wrote:
>>> These two are independent, but apparently we have a bug here, which will
>>> make what you did malfunction in some cases -- the test will not run for
>>> ilp32 if you have RUNTESTFLAGS {-m32,-m64}.
>>
>> Yeah, because of the bug (or call it surprised behavior),
>
> No, I call it a bug. Because that is what it is!
>
OK. :)
>> the test case can
>> fail for some dejaGnu version like 1.5.1 (how it places the dg-options
>> matters).
>
> Yes, but that is only one way to expose the problem.
>
> The bug just should be fixed.
Agreed.
>
>> But to be clarified, the order of
>>
>> /* { dg-options "-O2 -mpowerpc64" } */
>>
>> and
>>
>> /* { dg-require-effective-target has_arch_ppc64 } */
>>
>> matters in this proposed fix, not for the line with ilp32.
>
> Of course :-)
>
>> has_arch_ppc64 uses current_compiler_flags which only incorporates dg-options
>> which is placed before the dg-require-effective-target. I guess it's related
>> to how dejaGnu parses lines and sets global variables, for this kind of case,
>> we have to put the expected order for now.
>
> Even just to avoid having to uselessly edit hundreds of testcases, it
> would be better to just fix the bug!
I think "the bug" here means the "-mpower64" with "-m32/-m64" thing, not the
dejaGnu thing mentioned above, then yes.
BR,
Kewen