[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-16 Thread rguenth at gcc dot gnu dot org
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Summary|glibc regex testsuite |[4.5 Regression] glibc regex |failures

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-17 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-03-17 15:19 --- Waiting for testcase. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added S

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-03-23 13:39 --- David? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread davem at gcc dot gnu dot org
--- Comment #3 from davem at gcc dot gnu dot org 2010-03-23 20:40 --- Sorry, it's taking a long time to sort out the test case. The GLIBC regex code is huge and non-trivial. However I did track down that it might be dependent upon optimization options, for example I can reproduce with

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread jakub at gcc dot gnu dot org
--- Comment #4 from jakub at gcc dot gnu dot org 2010-03-23 22:41 --- Wouldn't this be the same issue as http://gcc.gnu.org/ml/gcc-patches/2010-03/msg01086.html ? On the trunk it wasn't just one commit, but several: 156888, 156889, 156893, 156903, 156913 If yes, would be interesting to k

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread davem at davemloft dot net
--- Comment #5 from davem at davemloft dot net 2010-03-24 03:01 --- Yes, the failures mentioned in: http://gcc.gnu.org/ml/gcc-patches/2010-03/msg01086.html are the same exact ones I am seeing. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread davem at davemloft dot net
--- Comment #6 from davem at davemloft dot net 2010-03-24 06:00 --- In the regex cases, glibc/posix/regexec.c:merge_state_with_log() is what gets miscompiled. I will attach match_good.s and match_bad.s match_good.s is a working compile of this function, using gcc-4.3.2 match_bad.s is

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread davem at davemloft dot net
--- Comment #7 from davem at davemloft dot net 2010-03-24 06:01 --- Created an attachment (id=20177) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20177&action=view) correctly compiled function -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread davem at davemloft dot net
--- Comment #8 from davem at davemloft dot net 2010-03-24 06:02 --- Created an attachment (id=20178) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20178&action=view) miscompiled function -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread jakub at gcc dot gnu dot org
--- Comment #9 from jakub at gcc dot gnu dot org 2010-03-24 06:38 --- Could you please also attach regexec.i (and what gcc options were used to compile it), so that I can inspect it with a cross-compiler? Thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-23 Thread davem at davemloft dot net
--- Comment #10 from davem at davemloft dot net 2010-03-24 06:43 --- Created an attachment (id=20179) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20179&action=view) source that emitted miscompiled function -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #11 from jakub at gcc dot gnu dot org 2010-03-24 07:05 --- Created an attachment (id=20180) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20180&action=view) hack Minimal patch that should allow playing with reversion of both parts of PR42233 just by changing that 1 to

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #12 from jakub at gcc dot gnu dot org 2010-03-24 07:08 --- FYI, the only change I'm seeing is: - subcc %g0, %g1, %g0 - addx%g0, 0, %g1 with 1 vs. 0 in gimple_boolify and no effect with the other changes. That said, I'm probably using different cc1 options t

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread davem at davemloft dot net
--- Comment #13 from davem at davemloft dot net 2010-03-24 16:55 --- I'm not passing anything special to the build, just stock "-O2" with a 32-bit compiler. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #14 from jakub at gcc dot gnu dot org 2010-03-24 17:02 --- Can you please try the #c11 patch with 0 && instead of 1 && in gimple_boolify and see whether you see any difference beyond those two insns (and whether it works)? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #15 from jakub at gcc dot gnu dot org 2010-03-24 17:04 --- Perhaps also with -fverbose-asm see what options were actually used during the compilation? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread davem at davemloft dot net
--- Comment #16 from davem at davemloft dot net 2010-03-24 17:08 --- I'm trying to distill a test case currently and also something broke bootstrap on sparc in the past day or two (I think it's the IRA change) which I want to track down first. I'll play with your patch once I get past t

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread davem at davemloft dot net
--- Comment #17 from davem at davemloft dot net 2010-03-24 17:22 --- I get the same two instruction change you saw with "0 &&" and it makes the test pass. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread doko at ubuntu dot com
--- Comment #18 from doko at ubuntu dot com 2010-03-24 17:31 --- seen on the 4.4 branch as well on ia64-linux-gnu, configured --with-system-libunwind sparc-linux-gnu, building with -m32 -mcpu=ultrasparc arm-linux-gnueabi, configured with -with-arch=armv7-a --with-float=softfp --with-fpu

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread davem at davemloft dot net
--- Comment #19 from davem at davemloft dot net 2010-03-24 17:59 --- Created an attachment (id=20186) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20186&action=view) Distilled test case. The expression that causes problems is: if (__builtin_expect (integer, 0) && ptr != NULL)

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #20 from jakub at gcc dot gnu dot org 2010-03-24 20:54 --- Thanks, will debug tomorrow. At least it is in gimple_boolify which is much shorter than the other changes... -- jakub at gcc dot gnu dot org changed: What|Removed |Added -

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #21 from jakub at gcc dot gnu dot org 2010-03-24 22:48 --- I guess we want to call gimple_boolify on the __builtin_expect argument only if it is (inside of the (long) cast) one of the handled cases (TRUTH_*_EXPR, comparisons), but not in the case it is neither of these - then

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #22 from jakub at gcc dot gnu dot org 2010-03-24 23:41 --- Created an attachment (id=20190) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20190&action=view) gcc45-pr43385.patch So far only very lightly tested fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=433

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #23 from jakub at gcc dot gnu dot org 2010-03-24 23:54 --- Created an attachment (id=20191) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20191&action=view) gcc45-pr43385.patch Simpler version of the patch. -- jakub at gcc dot gnu dot org changed: What

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #24 from jakub at gcc dot gnu dot org 2010-03-25 00:15 --- Created an attachment (id=20192) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20192&action=view) gcc45-pr43385.patch And now with a testcase (hopefully it fails on sparc* without the patch). -- jakub at gc

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread doko at ubuntu dot com
--- Comment #25 from doko at ubuntu dot com 2010-03-25 00:23 --- the testcase fails without the patch (on sparc, 4.4 branch) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread davem at davemloft dot net
--- Comment #26 from davem at davemloft dot net 2010-03-25 03:41 --- I'll run this patch through my tests, thanks Jakub. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-24 Thread jakub at gcc dot gnu dot org
--- Comment #27 from jakub at gcc dot gnu dot org 2010-03-25 06:53 --- More complete testcase: /* PR c/43385 */ extern void abort (void); int e; __attribute__((noinline, noclone)) void foo (int x, int y) { if (__builtin_expect (x, 0) && y != 0) e++; } __attribute__((noinline, n

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-25 Thread jakub at gcc dot gnu dot org
--- Comment #28 from jakub at gcc dot gnu dot org 2010-03-25 08:16 --- Subject: Bug 43385 Author: jakub Date: Thu Mar 25 08:16:18 2010 New Revision: 157721 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157721 Log: PR c/43385 * gimplify.c (gimple_boolify): Only r

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-25 Thread sezeroz at gmail dot com
--- Comment #29 from sezeroz at gmail dot com 2010-03-25 08:54 --- The testcase fails with gcc-4.4 at -O1 and higher, too (x86_64-pc-linux-gnu, with or without -m32.) It would be nice to have the fix backported to 4.4. -- sezeroz at gmail dot com changed: What|Removed

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-25 Thread doko at ubuntu dot com
--- Comment #30 from doko at ubuntu dot com 2010-03-25 11:45 --- checked on ia64 and sparc, that the patch fixes the problem with 4.4. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43385

[Bug c/43385] [4.5 Regression] glibc regex testsuite failures

2010-03-25 Thread jakub at gcc dot gnu dot org
--- Comment #31 from jakub at gcc dot gnu dot org 2010-03-25 11:55 --- Subject: Bug 43385 Author: jakub Date: Thu Mar 25 11:55:08 2010 New Revision: 157722 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157722 Log: PR c/43385 * gimplify.c (gimple_boolify): Only r