[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #49 from bernds_cb1 at t-online dot de 2010-03-08 23:06 --- This fix caused a SPEC regression (see bug 42216). Could you test the patch I attached to #42216, on top of current mainline, to see whether it does not cause your problem to reappear? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #48 from rguenth at gcc dot gnu dot org 2010-03-07 15:35 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #47 from bernds at gcc dot gnu dot org 2010-03-07 15:20 --- Subject: Bug 42220 Author: bernds Date: Sun Mar 7 15:20:12 2010 New Revision: 157263 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157263 Log: PR rtl-optimization/42220 * regrename.c (scan_rtx) : Use verify_reg_tracked to determine if we should use OP_OUT rather than OP_INOUT. (build_def_use): If we see an in-out operand for a register that we know nothing about, treat is an output if possible, fail the block if not. Modified: trunk/gcc/ChangeLog trunk/gcc/regrename.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #46 from dominiq at lps dot ens dot fr 2010-03-01 13:34 --- Anything else I can do for this pr? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #45 from dominiq at lps dot ens dot fr 2010-02-22 11:21 --- Bootstrapped and regtested on powerpc-apple-darwin9 (see http://gcc.gnu.org/ml/gcc-testresults/2010-02/msg02098.htm ) and x86_64-apple-darwin10 (see http://gcc.gnu.org/ml/gcc-testresults/2010-02/msg02102.html) with the patch in comment #43 with the fix in comment #44. Everything I can look at seems to work as expected. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #44 from dominiq at lps dot ens dot fr 2010-02-18 19:10 --- The patch in comment #43 with the fix in comment #44 works for the limited tests I am able to do right now. I can do a "full" test with a fresh bootstrap of gcc and fortran, but it will take a full day, so I'ld prefer to do it during the week-end. Thanks for the patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #43 from dominiq at lps dot ens dot fr 2010-02-18 18:44 --- The compilation of gcc/regrename.c fails with ... cc1: warnings being treated as errors ../../gcc-4.5-work/gcc/regrename.c: In function 'build_def_use': ../../gcc-4.5-work/gcc/regrename.c:1113:6: error: array subscript has type 'char' The line is has_dup[recog_data.dup_num[i]] = true; trying has_dup[(int) recog_data.dup_num[i]] = true; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #42 from bernds_cb1 at t-online dot de 2010-02-18 18:13 --- Created an attachment (id=19917) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19917&action=view) Another test patch that attempts to fix the problem. Could you test whether this fixes it? -- bernds_cb1 at t-online dot de changed: What|Removed |Added Attachment #19900|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #41 from dominiq at lps dot ens dot fr 2010-02-18 15:59 --- Created an attachment (id=19915) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19915&action=view) .rnreg for -fdbg-cnt=rnreg:138 Command line gfc -fdump-rtl-rnreg-details -fdbg-cnt=rnreg:138 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #40 from dominiq at lps dot ens dot fr 2010-02-18 15:58 --- Created an attachment (id=19914) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19914&action=view) .rnreg for -fdbg-cnt=rnreg:137 Command used fc -fdump-rtl-rnreg-details -fdbg-cnt=rnreg:137 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #39 from bernds_cb1 at t-online dot de 2010-02-18 15:52 --- (In reply to comment #36) > > Could you attach the .rnreg dumps > > How do I get them? > -fdump-rtl-rnreg-details -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #38 from dominiq at lps dot ens dot fr 2010-02-18 15:41 --- Created an attachment (id=19912) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19912&action=view) Assembly for -fdbg-cnt=rnreg:138 Command line gfc -S -fdbg-cnt=rnreg:138 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #37 from dominiq at lps dot ens dot fr 2010-02-18 15:40 --- Created an attachment (id=19911) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19911&action=view) Assembly for -fdbg-cnt=rnreg:137 Command used gfc -S -fdbg-cnt=rnreg:137 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #36 from dominiq at lps dot ens dot fr 2010-02-18 15:38 --- > Could you attach the .rnreg dumps How do I get them? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #35 from bernds_cb1 at t-online dot de 2010-02-18 15:32 --- Okay, great. Could you attach the .rnreg dumps and assembly output for both values? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #34 from dominiq at lps dot ens dot fr 2010-02-18 15:08 --- And the winner is N=137! [karma] f90/bug% gfc -fdbg-cnt=rnreg:137 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 dbg_cnt 'rnreg' set to 137 [karma] f90/bug% a.out [karma] f90/bug% gfc -fdbg-cnt=rnreg:138 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 dbg_cnt 'rnreg' set to 138 [karma] f90/bug% a.out check4: z=.000 + I .000 zref=1.000 + I .000 Diff: -1.000 + I*.000 eps=.23841858E-06 Abort -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #33 from dominiq at lps dot ens dot fr 2010-02-18 14:22 --- > Sorry about that. Yes, you'll need to add that in dbgcnt.def, or just apply > this additional patch. This recompiles most of gcc!-(it will take a couple hours on my poor G5!-). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #32 from bernds_cb1 at t-online dot de 2010-02-18 14:17 --- Created an attachment (id=19908) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19908&action=view) Additional patch on top of the previous one Sorry about that. Yes, you'll need to add that in dbgcnt.def, or just apply this additional patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #31 from dominiq at lps dot ens dot fr 2010-02-18 14:06 --- > It looks like there should be a patch to dbgcnt.def. Does this mean that I should remove the line + enum debug_counter rnreg; I have added, and add a line DEBUG_COUNTER (rnreg) in dbgcnt.def? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #30 from steven at gcc dot gnu dot org 2010-02-18 13:53 --- It looks like there should be a patch to dbgcnt.def. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #29 from dominiq at lps dot ens dot fr 2010-02-18 13:42 --- In order to compile gcc/regrename.c, I had to add + enum debug_counter rnreg; Is this right? Then compiling the test with gfc -fdbg-cnt=rnreg:1 -m64 -O1 -frename-registers /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 I get the following error f951: error: Can not find a valid counter:value pair: f951: error: -fdbg-cnt=rnreg:1 f951: error: ^ What is missing? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #28 from bernds_cb1 at t-online dot de 2010-02-18 12:21 --- Only when building the testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #27 from dominiq at lps dot ens dot fr 2010-02-18 12:17 --- > You'll need to use a kind of binary search using the -fdbg-cnt=rnreg:N option, > where N is an integer. Start with something small, maybe even 1, then double > it until the failure appears. Then do a binary search between the last number > that produced a working binary, and the one that did not. Should I use '-fdbg-cnt=rnreg:N' to build gcc or only when testing complex_intrinsic_5.f90? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #26 from bernds_cb1 at t-online dot de 2010-02-18 11:51 --- Created an attachment (id=19905) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19905&action=view) A patch to help debug the problem I'll need some help since on my system a compiler targetting powerpc-apple-darwin9 produces rather different output in the dumps than what is attached to this bug. The powerpc-linux failures look unrelated as they appear even at -O0. If the problem really is in regrename, the attached patch should help debug it. If you wish to help, please follow these instructions. You'll need to use a kind of binary search using the -fdbg-cnt=rnreg:N option, where N is an integer. Start with something small, maybe even 1, then double it until the failure appears. Then do a binary search between the last number that produced a working binary, and the one that did not. You should end up with a value of N such that -fdbg-cnt=rnreg:N produces a working executable, and -fdbg-cnt=rnreg:N+1 does not. Please attach the .rnreg dumps and assembly files for both. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #25 from dominiq at lps dot ens dot fr 2010-02-18 08:00 --- > Would you mind testing the attached patch? Apparently the patch in comment #23 does not fix the problem (incremental update of gcc and partial test): make -k check-gfortran RUNTESTFLAGS="dg.exp=complex*.f90 --target_board=unix'{-m32,-m64}'" Running target unix/-m32 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /opt/gcc/gcc-4.5-work/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /opt/gcc/gcc-4.5-work/gcc/testsuite/gfortran.dg/dg.exp ... === gfortran Summary for unix/-m32 === # of expected passes104 Running target unix/-m64 Using /sw/share/dejagnu/baseboards/unix.exp as board description file for target. Using /sw/share/dejagnu/config/unix.exp as generic interface file for target. Using /opt/gcc/gcc-4.5-work/gcc/testsuite/config/default.exp as tool-and-target-specific interface file. Running /opt/gcc/gcc-4.5-work/gcc/testsuite/gfortran.dg/dg.exp ... FAIL: gfortran.dg/complex_intrinsic_5.f90 -O3 -fomit-frame-pointer -funroll-loops execution test FAIL: gfortran.dg/complex_intrinsic_5.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test === gfortran Summary for unix/-m64 === # of expected passes102 # of unexpected failures2 === gfortran Summary === # of expected passes206 # of unexpected failures2 /opt/gcc/darwin_buildw/gcc/testsuite/gfortran/../../gfortran version 4.5.0 20100215 (experimental) [trunk revision 156774p2] (GCC) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #24 from bernds_cb1 at t-online dot de 2010-02-17 22:14 --- Would you mind testing the attached patch? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #23 from bernds_cb1 at t-online dot de 2010-02-17 22:13 --- Created an attachment (id=19900) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19900&action=view) Possible fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #22 from mmitchel at gcc dot gnu dot org 2010-02-17 16:52 --- I don't think we really know enough yet to understand whether this is a bug, or if it is a bug, where the bug might lie. So, we certainly can't make it P1, ignoring even the fact that this test is in Fortran. But, it would be good if we could understand the situation better. -- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #21 from dominiq at lps dot ens dot fr 2010-02-16 18:13 --- > Comment #9 suggests you can reproduce this without -frename-registers. Is > this > correct? >From comment #12: > -funroll-loops triggers -frename-registers which again would hint at > Bernds change. I think the answer is no: the test passes with '-m64 -O1' but fails with '-m64 -O1 -frename-registers'. For the record I am using GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8. If needed I can try to update to mpc 0.8.1 (so far I failed to update GMP, both 4.3.2 and 5.0.1). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #20 from bernds_cb1 at t-online dot de 2010-02-16 17:40 --- Sorry I've seen this so late; the mails I got have been hidden in my unread fortran folder so far. Need to change the filters. Comment #9 suggests you can reproduce this without -frename-registers. Is this correct? What I'd be looking at is if mpc has functions written in assembly that maybe clobber registers they shouldn't. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #19 from dominiq at lps dot ens dot fr 2010-01-30 22:23 --- The test fails also on powerpc-unknown-linux-gnu (see http://gcc.gnu.org/ml/gcc-testresults/2010-01/msg02790.html ). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #18 from dominiq at lps dot ens dot fr 2010-01-11 12:20 --- > Still present? Yes!-(If it has not been fixed meanwhile, it still fails at revision 155621). -- dominiq at lps dot ens dot fr changed: What|Removed |Added Status|WAITING |UNCONFIRMED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #17 from ebotcazou at gcc dot gnu dot org 2010-01-11 11:31 --- Still present? -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #16 from dominiq at lps dot ens dot fr 2009-12-14 20:54 --- Created an attachment (id=19299) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19299&action=view) assembly generated without -frename-registers -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #15 from dominiq at lps dot ens dot fr 2009-12-14 20:48 --- Created an attachment (id=19298) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19298&action=view) assembly generated with -frename-registers -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers
--- Comment #14 from dominiq at lps dot ens dot fr 2009-12-14 20:42 --- When compiled with '-m64 -O1 -frename-registers' the code in comment #6 fails, but passes with ''-m64 -O1'. > If no calls remain in the assembly as dominiq suggests then the > *call_value_nonlocal_darwin64 pattern must be bogus. I do not see "call", but in both cases ... bl L_casinf$stub ... which I understand as an other form of call. So the darwin math lib seems to work correctly when -frename-registers is not used. I'll attach the assembly generated with/without the option. -- dominiq at lps dot ens dot fr changed: What|Removed |Added Status|WAITING |UNCONFIRMED Summary|[4.5 Regression] FAIL: |[4.5 Regression] FAIL: |gfortran.dg/complex_intrinsi|gfortran.dg/complex_intrinsi |c_5.f90 -m64 -O -frename- |c_5.f90 -m64 -O -frename- |registers -fomit-frame- |registers |pointers| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220
[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers -fomit-frame-pointers
--- Comment #13 from rguenth at gcc dot gnu dot org 2009-12-14 14:01 --- If no calls remain in the assembly as dominiq suggests then the *call_value_nonlocal_darwin64 pattern must be bogus. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||dje at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42220