Re: [PATCH, PR81844] Fix condition folding in c_parser_omp_for_loop

2017-12-10 Thread Jakub Jelinek
On Sun, Dec 10, 2017 at 03:00:24PM +0100, Tom de Vries wrote: > On 09/14/2017 12:55 PM, Jakub Jelinek wrote: > > Ok with those changes > > Hi, > > this PR has been fixed on trunk ( > https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=252873 ). > > We cannot count this PR as a 6/7 regression,

Re: [PATCH, PR81844] Fix condition folding in c_parser_omp_for_loop

2017-12-10 Thread Tom de Vries
On 09/14/2017 12:55 PM, Jakub Jelinek wrote: Ok with those changes Hi, this PR has been fixed on trunk ( https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=252873 ). We cannot count this PR as a 6/7 regression, because this test-case has been failing since fopenmp was introduced in 4.2

Re: [PATCH, PR81844] Fix condition folding in c_parser_omp_for_loop

2017-09-14 Thread Jakub Jelinek
On Thu, Sep 14, 2017 at 07:34:14PM +, de Vries, Tom wrote: > --- a/libgomp/testsuite/libgomp.c++/c++.exp > +++ b/libgomp/testsuite/libgomp.c++/c++.exp > @@ -22,6 +22,11 @@ dg-init > # Turn on OpenMP. > lappend ALWAYS_CFLAGS "additional_flags=-fopenmp" > > +# Switch into C++ mode. Otherwis

Re: [PATCH, PR81844] Fix condition folding in c_parser_omp_for_loop

2017-09-14 Thread de Vries, Tom
> I know we don't have > libgomp.c-c++-common (maybe we should add that) Like so? Ran: - make check-target-libgomp RUNTESTFLAGS=c.exp=cancel-taskgroup-1.c - make check-target-libgomp RUNTESTFLAGS=c++.exp=cancel-taskgroup-1.c Currently running make check-target-libgomp. OK for trunk if tests pa

Re: [PATCH, PR81844] Fix condition folding in c_parser_omp_for_loop

2017-09-14 Thread Jakub Jelinek
On Mon, Aug 14, 2017 at 10:25:22AM +0200, Tom de Vries wrote: > 2017-08-14 Tom de Vries > > PR c/81844 Please use PR c/81875 instead, now that you've filed it. > * c-parser.c (c_parser_omp_for_loop): Fix condition folding. Fold only operands of cond, not cond itself. ? > *

[PATCH, PR81844] Fix condition folding in c_parser_omp_for_loop

2017-08-14 Thread Tom de Vries
Hi, this patch fixes the wrong-code PR81844, where an omp for loop is incorrectly removed by the compiler. Consider the test-case from the patch. It contains a omp for condition 'i > 0x7fffULL', where i is of type unsigned long long int. In c_parser_omp_for_loop, we first hav