This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 3 August 2016 at 17:27, Matthew Wahab <matthew.wahab@foss.arm.com> wrote: > On 29/07/16 15:32, Prathamesh Kulkarni wrote: >> >> On 29 July 2016 at 12:42, Richard Biener <rguenther@suse.de> wrote: >>> >>> On Fri, 29 Jul 2016, Prathamesh Kulkarni wrote: >>> >>>> On 28 July 2016 at 19:18, Richard Biener <rguenther@suse.de> wrote: >>>>> >>>>> On Thu, 28 Jul 2016, Prathamesh Kulkarni wrote: >>>>> >>>>>> On 28 July 2016 at 15:58, Andreas Schwab <schwab@suse.de> wrote: >>>>>>> >>>>>>> On Mo, Jul 25 2016, Prathamesh Kulkarni >>>>>>> <prathamesh.kulkarni@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 ? Thanks, Prathamesh > > Matthew >
Attachment:
foo.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |