On 4 August 2016 at 12:39, Richard Biener <rguent...@suse.de> wrote:
> On Thu, 4 Aug 2016, Prathamesh Kulkarni wrote:
>
>> On 3 August 2016 at 17:27, Matthew Wahab <matthew.wa...@foss.arm.com> wrote:
>> > On 29/07/16 15:32, Prathamesh Kulkarni wrote:
>> >>
>> >> On 29 July 2016 at 12:42, Richard Biener <rguent...@suse.de> wrote:
>> >>>
>> >>> On Fri, 29 Jul 2016, Prathamesh Kulkarni wrote:
>> >>>
>> >>>> On 28 July 2016 at 19:18, Richard Biener <rguent...@suse.de> wrote:
>> >>>>>
>> >>>>> On Thu, 28 Jul 2016, Prathamesh Kulkarni wrote:
>> >>>>>
>> >>>>>> On 28 July 2016 at 15:58, Andreas Schwab <sch...@suse.de> wrote:
>> >>>>>>>
>> >>>>>>> On Mo, Jul 25 2016, Prathamesh Kulkarni
>> >>>>>>> <prathamesh.kulka...@linaro.org> wrote:
>> >>>>>>>
>> >>>>>>>> diff --git a/gcc/testsuite/gcc.dg/pr70920-4.c
>> >>>>>>>> b/gcc/testsuite/gcc.dg/pr70920-4.c
>> >>>>>>>> new file mode 100644
>> >>>>>>>> index 0000000..dedb895
>> >>>>>>>> --- /dev/null
>> >>>>>>>> +++ b/gcc/testsuite/gcc.dg/pr70920-4.c
>> >>>>>>>> @@ -0,0 +1,21 @@
>> >>>>>>>> +/* { dg-do compile } */
>> >>>>>>>> +/* { dg-options "-O2 -fdump-tree-ccp-details
>> >>>>>>>> -Wno-int-to-pointer-cast" } */
>> >>>>>>>> +
>> >>>>>>>> +#include <stdint.h>
>> >>>>>>>> +
>> >>>>>>>> +void f1();
>> >>>>>>>> +void f2();
>> >>>>>>>> +
>> >>>>>>>> +void
>> >>>>>>>> +foo (int a)
>> >>>>>>>> +{
>> >>>>>>>> +  void *cst = 0;
>> >>>>>>>> +  if ((int *) a == cst)
>> >>>>>>>> +    {
>> >>>>>>>> +      f1 ();
>> >>>>>>>> +      if (a)
>> >>>>>>>> +     f2 ();
>> >>>>>>>> +    }
>> >>>>>>>> +}
>> >>>>>>>> +
>> >>>>>>>> +/* { dg-final { scan-tree-dump "gimple_simplified to if
>> >>>>>>>> \\(_\[0-9\]* == 0\\)" "ccp1" } } */
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> This fails on all ilp32 platforms.
>> >
>> > [..]
>> >>>
>> >>>
>> >>> I don't think just matching == 0 is a good idea.  I suggest to
>> >>> restrict the testcase to lp64 targets and maybe add a ilp32 variant.
>> >>
>> >> Hi,
>> >> I restricted the test-case to lp64 targets.
>> >> Is this OK to commit ?
>> >
>> >
>> > Hello,
>> >
>> > The test case is failing for arm-none-linux-gnueabihf.
>> Oops, sorry about that.
>> >
>> > It is correctly skipped if the 'dg-require-effective-target lp64' you added
>> > is moved to the end of the directives (after the dg-options).
>> Indeed, it is skipped after moving to end.
>> Is it OK to commit the attached patch ?
>
> I believe the canonical place is after do-do but before dg-options.
> Can you check if that works, too?
Yes that works. Should I commit the attached patch ?

Thanks,
Prathamesh
>
> Richard.
>
>> Thanks,
>> Prathamesh
>> >
>> > Matthew
>> >
>>
>
> --
> Richard Biener <rguent...@suse.de>
> SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
> 21284 (AG Nuernberg)
diff --git a/gcc/testsuite/gcc.dg/pr70920-4.c b/gcc/testsuite/gcc.dg/pr70920-4.c
index ab2748b..e9c2b95 100644
--- a/gcc/testsuite/gcc.dg/pr70920-4.c
+++ b/gcc/testsuite/gcc.dg/pr70920-4.c
@@ -1,5 +1,5 @@
-/* { dg-require-effective-target lp64 } */
 /* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
 /* { dg-options "-O2 -fdump-tree-forwprop-details -Wno-int-to-pointer-cast" } 
*/
 
 #include <stdint.h>

Reply via email to