[Bug target/45524] r163815/r163816 produces new regressions on x86_64-apple-darwin10
--- Comment #38 from krebbel at gcc dot gnu dot org 2010-09-06 07:49 --- (In reply to comment #33) A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00375.html Thanks for fixing it. And sorry for not testing it thoroughly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45524
[Bug middle-end/44203] [4.6 regression] New prefetch test failures
--- Comment #4 from krebbel at gcc dot gnu dot org 2010-05-25 11:18 --- Subject: Bug 44203 Author: krebbel Date: Tue May 25 11:18:07 2010 New Revision: 159816 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159816 Log: 2010-05-25 Christian Borntraeger borntrae...@de.ibm.com PR 44203 * tree-ssa-loop-prefetch.c: Fix logic for step calculation to match the original (and intended) behaviour before r159557. This changeset changed a=a+b*c to a=(a+b)*b which was obviously wrong in two ways. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-loop-prefetch.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44203
[Bug middle-end/44078] [4.6 regression] FAIL: gcc.dg/tree-ssa/prefetch-7.c
--- Comment #4 from krebbel at gcc dot gnu dot org 2010-05-17 07:54 --- Subject: Bug 44078 Author: krebbel Date: Mon May 17 07:53:20 2010 New Revision: 159475 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159475 Log: 2010-05-17 Christian Borntraeger borntrae...@de.ibm.com PR 44078 * gcc.dg/tree-ssa/prefetch-7.c: Change pattern to match only the old debug messages but not the newly introduced one. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/tree-ssa/prefetch-7.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44078
[Bug target/43635] [4.5/4.6 Regression] ICE in s390_emit_call, at config/s390/s390.c:9484
--- Comment #7 from krebbel at gcc dot gnu dot org 2010-04-20 07:51 --- Subject: Bug 43635 Author: krebbel Date: Tue Apr 20 07:51:14 2010 New Revision: 158540 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158540 Log: 2010-04-20 Andreas Krebbel andreas.kreb...@de.ibm.com PR target/43635 * config/s390/s390.c (s390_emit_call): Turn direct into indirect calls for -fpic -m31 if they have been sibcall optimized. 2010-04-20 Andreas Krebbel andreas.kreb...@de.ibm.com PR target/43635 * gcc.c-torture/compile/pr43635.c: New testcase. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr43635.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/s390.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43635
[Bug target/43635] [4.5/4.6 Regression] ICE in s390_emit_call, at config/s390/s390.c:9484
--- Comment #8 from krebbel at gcc dot gnu dot org 2010-04-20 08:18 --- Subject: Bug 43635 Author: krebbel Date: Tue Apr 20 08:18:18 2010 New Revision: 158541 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158541 Log: 2010-04-20 Andreas Krebbel andreas.kreb...@de.ibm.com PR target/43635 * config/s390/s390.c (s390_emit_call): Turn direct into indirect calls for -fpic -m31 if they have been sibcall optimized. 2010-04-20 Andreas Krebbel andreas.kreb...@de.ibm.com PR target/43635 * gcc.c-torture/compile/pr43635.c: New testcase. Added: branches/gcc-4_5-branch/gcc/testsuite/gcc.c-torture/compile/pr43635.c Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config/s390/s390.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43635
[Bug target/43635] [4.5/4.6 Regression] ICE in s390_emit_call, at config/s390/s390.c:9484
--- Comment #9 from krebbel at gcc dot gnu dot org 2010-04-20 08:21 --- Fixed with the patch above. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43635
[Bug target/43635] [4.5/4.6 Regression] ICE in s390_emit_call, at config/s390/s390.c:9484
--- Comment #5 from krebbel at gcc dot gnu dot org 2010-04-08 09:23 --- (In reply to comment #4) The extra cast happens if the function signatures are not compatible (by means of useless_type_conversion_p). Ok. Do you know why that behavior changed between gcc 4.4 and 4.5? Is there a way to obtain the function decl from D.1966_3 in the 4.5 example or do we really need to reject sibcall optimizations in that case? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43635
[Bug target/43636] [4.5/4.6 Regression] ICE in extract_insn, at recog.c:2103
--- Comment #3 from krebbel at gcc dot gnu dot org 2010-04-07 11:46 --- Created an attachment (id=20327) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20327action=view) (delta) Reduced testcase The S/390 movstr expander requires the target operand to be a register_operand. expand_movstr does not seem to respect this: (define_expand movstr [(set (reg:SI 0) (const_int 0)) (parallel [(clobber (match_dup 3)) (set (match_operand:BLK 1 memory_operand ) (match_operand:BLK 2 memory_operand )) (set (match_operand 0 register_operand ) (unspec [(match_dup 1) (match_dup 2) (reg:SI 0)] UNSPEC_MVST)) (clobber (reg:CC CC_REGNUM))])] ... With 4.4 the target operand is put into a register before expand_movstr is invoked. I haven't looked into why that changed with 4.5 yet but from a first glance I would say that this isn't a back-end problem. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Attachment #20301|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43636
[Bug target/43636] [4.5/4.6 Regression] ICE in extract_insn, at recog.c:2103
-- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-04-07 11:47:15 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43636
[Bug target/43635] [4.5/4.6 Regression] ICE in s390_emit_call, at config/s390/s390.c:9484
--- Comment #3 from krebbel at gcc dot gnu dot org 2010-04-07 15:56 --- Created an attachment (id=20328) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20328action=view) Reduced testcase The check for valid sibcalls in the S/390 back-end relies on the decl to be available in the DECL parameter: /* The 31 bit PLT code uses register 12 (GOT pointer - caller saved) which would have to be restored before the sibcall. */ if (!TARGET_64BIT flag_pic decl !targetm.binds_local_p (decl)) return false; The type cast of the function pointer in the testcase introduces a temporary variable on 4.5 which is not linked with the function decl anymore: x_1 = (void (*T244) (float) (*T248) (void *)) d; D.1966_3 = x_1 (p_2(D)); [tail call] return D.1966_3; With 4.4: D.1224 = (void (*T242) (float) (*T246) (void *)) d (p); [tail call] return D.1224; So we probably have to always reject sibcalls if the fndecl is not reachable. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Attachment #20300|0 |1 is obsolete|| AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43635
[Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
--- Comment #7 from krebbel at gcc dot gnu dot org 2010-03-11 13:51 --- Subject: Bug 43280 Author: krebbel Date: Thu Mar 11 13:51:00 2010 New Revision: 157386 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=157386 Log: 2010-03-11 Andreas Krebbel andreas.kreb...@de.ibm.com PR tree-optimization/43280 * tree-ssa-math-opts.c (find_bswap_1): Modify symbolic number generation. Move calculation of size out of the if branch. (find_bswap): Modify compare number generation. 2010-03-11 Andreas Krebbel andreas.kreb...@de.ibm.com * gcc.dg/optimize-bswapdi-1.c: Add OpenSSL bswap variant. * gcc.dg/pr43280.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr43280.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/optimize-bswapdi-1.c trunk/gcc/tree-ssa-math-opts.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
[Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
--- Comment #8 from krebbel at gcc dot gnu dot org 2010-03-11 14:06 --- (In reply to comment #6) Why does the new testcase have +/* { dg-require-effective-target lp64 } */ when the failure is shown with -m32 on x86-64? I've removed that in the new version. Thanks! -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
[Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
--- Comment #5 from krebbel at gcc dot gnu dot org 2010-03-10 16:31 --- Created an attachment (id=20074) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20074action=view) Experimental patch This patch fixes the problem for me. Testsuites are still running. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
[Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!
-- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2010-03-07 15:47:23 |2010-03-08 08:54:15 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280
[Bug c/42874] New: Error on correct code
The following testcase fails with: sorry, unimplemented: function foo can never be copied because it uses variable sized variables When compiled with at least -O1. It works fine with GCC 4.4.3. void __attribute__ ((always_inline)) foo (const unsigned long *addr, unsigned long size) { typedef struct { long x[size]; } addrtype; addrtype *a = (void *) addr; } Unfortunately these patterns are quite common in the Linux kernel - at least for S/390. They always used to compile but mainline currently is not able to build the kernel. -- Summary: Error on correct code Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42874
[Bug bootstrap/40597] Powerpc bootstrap is broken due to changes in expmed.c
--- Comment #39 from krebbel at gcc dot gnu dot org 2009-12-31 10:31 --- Ok. That looks good. I think the S/390 problem from comment #33 got fixed with that patch: http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01392.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40597
[Bug tree-optimization/42117] New: VRP fails to get rid of compares
The vrp47 testcase currently fails on i386 and S/390. The ssa code before vrp looks different for both compared to x86_64 due to a different value returned by BRANCH_COST. (Branches on S/390 are relatively cheap due to a sophisticated branch prediction unit.) Therefore during gimplification fold_truthop (line 5866) uses more branches for function h in vrp47.c than the x86_64 variant. The problem can also be reproduced on x86 when compiling for a cpu with low branch costs defined in i386.c as e.g. -march=i386. int h(int x, int y) { if ((x = 0 x = 1) (y = 0 y = 1)) return x y; else return -1; } Compile the testcase above with: cc1 -m32 -O2 vrp47.c -fdump-tree-vrp -march=i386 The vrp pass is not able to get rid of the comparisons in this case (069t.vrp1 from i386): h (int x, int y) { int D.2021; unsigned int y.1; unsigned int x.0; bb 2: x.0_4 = (unsigned int) x_3(D); if (x.0_4 = 1) goto bb 3; else goto bb 7; bb 3: y.1_6 = (unsigned int) y_5(D); if (y.1_6 = 1) goto bb 4; else goto bb 7; bb 4: if (x_3(D) != 0) goto bb 5; else goto bb 6; bb 5: if (y_5(D) != 0) goto bb 7; else goto bb 6; bb 6: bb 7: # D.2021_1 = PHI 0(6), -1(3), -1(2), 1(5) return D.2021_1; } -- Summary: VRP fails to get rid of compares Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: i386-gnu-linux, s390x-ibm-linux GCC host triplet: i386-gnu-linux, s390x-ibm-linux GCC target triplet: i386-gnu-linux, s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42117
[Bug middle-end/41535] New: Broken var location info after scheduling
On s390x I see broken debug info generated for the attached C++ testcase (compile with -O2 -g -fPIC). The debug info contains a symbol reference with a @GOTENT modifier what should not happen (and is not accepted by gas): .LLST3: .8byte .LVL3-.Ltext0 .8byte .LVL4-.Ltext0 .2byte 0xa .byte 0x9e .uleb128 0x8 .8byte _ztist12future_er...@gotent .8byte 0x0 .8byte 0x0 The problem is that the sched2 pass breaks the variable location information by moving an insn setting r1 over a var_location debug insn describing a variable location as being r1. in 202.split4: 29: var_location r10 33: var_location r13 + 8 34: var_location r10 30: r1 = (A got entry) 31: r1 = [r1] 83: [r13] = r2 32: r1 = [r1] 35: var_location A = r1 -- problematic location information 36: [r13 + 8] = r10 37: [r13 + 16] = r1 79: r1 = (B got entry) 41: r3 = [r1] in 203.sched2: ... 32: r1 = [r1] 37: [r13 + 16] = r1 79: r1 = (B got entry) -- insn moved over 35 83: [r13] = r2 29: var_location r10 33: var_location r13 + 8 34: var_location r10 35: var_location r1 !!! the variable location gets corrupted since insn 79 has been moved over it 36: [r13 + 8] = r10 41: r3 = [r1] The variable locations are intended to stay right after the insn which does the relevant assignment by generating an ANTI dep between them but we also create deps between unrelated insns: sched-deps.c:2790 if (prev NONDEBUG_INSN_P (prev)) add_dependence (insn, prev, REG_DEP_ANTI); This code creates a dependency between 83 and 29 (although the assignment is unrelated). This together with the fact that all debug insns are always been kept from being moved over each other makes all the debug insns to get stuck after insn 83. Although in order to keep the information correct insn 35 has to stay after 32. -- Summary: Broken var location info after scheduling Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41535
[Bug middle-end/41535] Broken var location info after scheduling
--- Comment #1 from krebbel at gcc dot gnu dot org 2009-10-01 15:58 --- Created an attachment (id=18687) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18687action=view) Testcase Compile with -O2 -fPIC -g -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41535
[Bug tree-optimization/41031] [4.5 Regression]: build breakage for cris-elf building newlib, ICE in insert_value_copy_on_edge
--- Comment #3 from krebbel at gcc dot gnu dot org 2009-08-11 07:56 --- The same happens when bootstrapping on s390x while building libdecnumber. Here is a reduced testcase: typedef struct { unsigned char bits; unsigned short int lsu[1]; } decNumber; void decCompareOp (decNumber * res, const decNumber * lhs, unsigned char op) { int result = 0; if lhs)-bits (0x20 | 0x10)) != 0)) { op = 0x02; if (lhs-bits 0x20) result = -1; } if (op == 0x01 || op == 0x06 || op == 0x04) { if (result != 0) *res-lsu = 1; } } -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2009-08-11 07:56:44 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41031
[Bug bootstrap/40597] Powerpc bootstrap is broken due to changes in expmed.c
--- Comment #33 from krebbel at gcc dot gnu dot org 2009-07-23 12:37 --- Your patch from 2009-06-30 prevents the following code from being implemented jumpless on S/390: int a, b; ... int x = a == b; In emit_store_flag the following code now invokes emit_store_flag_1 instead of emit_store_flag: if ((code == EQ || code == NE) op1 != const0_rtx) { tem = expand_binop (mode, xor_optab, op0, op1, subtarget, 1, OPTAB_WIDEN); if (tem == 0) tem = expand_binop (mode, sub_optab, op0, op1, subtarget, 1, OPTAB_WIDEN); if (tem != 0) tem = emit_store_flag_1 (target, code, tem, const0_rtx, mode, unsignedp, normalizep, target_mode); if (tem != 0) return tem; delete_insns_since (last); } But emit_store_flag_1 is not sufficient to implement this case jumpless since the code emitting the abs, sub and neg instructions is only in emit_store_flag: if (code == EQ || code == NE) { /* For EQ or NE, one way to do the comparison is to apply an operation that converts the operand into a positive number if it is nonzero or zero if it was originally zero. Then, for EQ, we subtract 1 and for NE we negate. This puts the result in the sign bit. Then we normalize with a shift, if needed. ... -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40597
[Bug middle-end/40501] [4.5 Regression] error: invalid conversion in gimple call
--- Comment #6 from krebbel at gcc dot gnu dot org 2009-06-24 07:01 --- Subject: Bug 40501 Author: krebbel Date: Wed Jun 24 07:01:24 2009 New Revision: 148892 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=148892 Log: 2009-06-24 Andreas Krebbel krebb...@de.ibm.com PR middle-end/40501 * tree-ssa-math-opts.c (execute_optimize_bswap): Convert the bswap src and dst operands if necessary. 2009-06-24 Andreas Krebbel krebb...@de.ibm.com * gcc.dg/pr40501.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr40501.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-math-opts.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40501
[Bug middle-end/40501] [4.5 Regression] error: invalid conversion in gimple call
-- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2009-06-21 23:23:32 |2009-06-22 08:15:06 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40501
[Bug middle-end/40501] [4.5 Regression] error: invalid conversion in gimple call
--- Comment #4 from krebbel at gcc dot gnu dot org 2009-06-22 17:20 --- Created an attachment (id=18047) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18047action=view) Initial Patch - not bootstrapped yet I currently don't understand why this didn't occur earlier. Did become the stmt checking more strict recently? However this patch converts the bswap builtin input value and the result to/from the types taken from the builtin function decl what seems to silent verify_stmt. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40501
[Bug rtl-optimization/35729] const volatile variable access incorrectly hoisted out of loop
--- Comment #10 from krebbel at gcc dot gnu dot org 2008-12-02 14:19 --- Fails on s390 and s390x as well. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35729
[Bug ada/37977] Missing ada multilib support for s390x
--- Comment #3 from krebbel at gcc dot gnu dot org 2008-11-02 18:43 --- Subject: Bug 37977 Author: krebbel Date: Sun Nov 2 18:42:04 2008 New Revision: 141537 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=141537 Log: 2008-11-02 Andreas Krebbel [EMAIL PROTECTED] PR target/37977 * gcc-interface/Makefile.in: Add multilib handling for s390-linux and s390x-linux. Modified: trunk/gcc/ada/ChangeLog trunk/gcc/ada/gcc-interface/Makefile.in -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37977
[Bug ada/37977] Missing ada multilib support for s390x
--- Comment #4 from krebbel at gcc dot gnu dot org 2008-11-02 18:48 --- Fixed with the patch above. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37977
[Bug ada/37977] New: System.Address size stays 64 bit with -m31
Ada currently doesn't bootstrap on s390x due to a pointer size mismatch when building the 32 bit version of a-except.o: /build2/gcc-build/./gcc/xgcc -B/build2/gcc-build/./gcc/ -B/build2/gcc-install/s390x-ibm-linux-gn u/bin/ -B/build2/gcc-install/s390x-ibm-linux-gnu/lib/ -isystem /build2/gcc-install/s390x-ibm-linux-gnu/include -isystem /build2/gcc-install/s390x-ibm-linux-gnu/sys-include -c -g -O2 -fPIC -mlong-double-128 -W -Wall -gnatpg -m31 -g -O1 -fn o-inline -fno-toplevel-reorder a-except.adb -o a-except.o -fdump-tree-all -gnatf a-exexpr.adb:169:04: warning: types for unchecked conversion have different sizes a-exexpr.adb:169:04: warning: size of Address is 64, size of Gnat_Gcc_Exception_Access is 32 a-exexpr.adb:169:04: warning: 32 trailing bits of source will be ignored in directory: gcc-build/gcc/ada/rts_32 -- Summary: System.Address size stays 64 bit with -m31 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37977
[Bug ada/37977] Missing ada multilib support for s390x
--- Comment #2 from krebbel at gcc dot gnu dot org 2008-10-31 09:11 --- Ok. I'm bootstrapping a patch which mimics what has been done for Power. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2008-10-31 08:42:53 |2008-10-31 09:11:34 date|| Summary|System.Address size stays 64|Missing ada multilib support |bit with -m31 |for s390x http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37977
[Bug middle-end/37884] [4.4 Regression] Bootstrap failure due to miscompilation of tree-vrp.c
--- Comment #4 from krebbel at gcc dot gnu dot org 2008-10-27 09:19 --- Thanks for the fix. The ira-merge branch now bootstraps on s390 and s390x: http://gcc.gnu.org/ml/gcc-testresults/2008-10/msg01894.html http://gcc.gnu.org/ml/gcc-testresults/2008-10/msg01879.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37884
[Bug middle-end/37884] [4.4 Regression] Bootstrap failure due to miscompilation of tree-vrp.c
--- Comment #1 from krebbel at gcc dot gnu dot org 2008-10-22 12:51 --- The problem again (similar to PR37674) seems to be related to the propagation of the hard reg conflict sets in ira_flattening. The conflict sets are only propagated to the parent allocno if the child allocno uses the same pseudo. This breaks the case below. The miscompile is created by IRA when assigning hard reg r14 to pseudo r295. That way the call in L4 might be reached with the clobbered value of r14 residing in r8. Assigning r14 to r295 seems to be valid in loop L1 but it is not in the nested loop L4 since L4 contains a call insn which clobbers r14. The conflict of a147r315 with r14 is properly recorded but is not propagated to L1 in ira_flattening. r295 as well as r315 are created by change_loop as copies of r83 in L0. +-+ | ++| | | bb 38 || | | r295=r7|| | ++| |a8r83 | L0| +++ | +++ +---+ |v| |+---+ | | +-+ | | +-+-|bb 57 | | | |bb 93|+-+---|bb 71| |r2=r8 | | | +-+ | | +-+-|clobber r14| | ||| | ^ +---+ | ||| | | | |v| | | | | +-+ | | | a147r315| | | bb 50 |---+-+-+ | | | r8=r295 | | | L4| | +-+ | +---+ | | | a57r295 L1| +-+ -- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |vmakarov at gcc dot gnu dot |dot org |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37884
[Bug middle-end/37884] New: [4.4 Regression] Bootstrap failure due to miscompilation of tree-vrp.c
GCC bootstrap on s390x currently fails with: /build2/gcc/libgcc/../gcc/libgcc2.c: In function '__ucmpdi2': /build2/gcc/libgcc/../gcc/libgcc2.c:1169: internal compiler error: in compare_ranges, at tree-vrp.c:3375 reload reassigns a hard reg to a pseudo which has been created by change-loop (ira-emit.c). The pseudo is live across a bb boundary. The target bb has another pred bb which clobbers the same hard reg which is chosen by reload for the pseudo. So my current guess is that either the liveness info is broken for the pseudo created by change_loop or reload does not respect it in some way. The problem might be related to PR37859 which describes a problem where IRA is not able to detect that a register has been modified in the loop body. I've tried the patch: http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00780.html without success. -- Summary: [4.4 Regression] Bootstrap failure due to miscompilation of tree-vrp.c Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: wrong-code, ra Severity: critical Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37884
[Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
--- Comment #9 from krebbel at gcc dot gnu dot org 2008-10-20 12:07 --- (In reply to comment #8) Does s390x-linux bootstrap now (possibly with PR37815 fix as well)? Can this be closed? This particular problem seems to be fixed for s390x. GCC still doesn't bootstrap - even with the patch from PR37815. There still is a problem with value range propagation. I'm working on this. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
--- Comment #10 from krebbel at gcc dot gnu dot org 2008-10-20 12:08 --- My testcase works fine with current GCC mainline. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|RESOLVED|VERIFIED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37815] [4.4 Regression] ICE in vt_add_function_parameters (bootstrap error)
--- Comment #7 from krebbel at gcc dot gnu dot org 2008-10-17 13:16 --- Same on s390x: http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00740.html Please note that the patch attached to the email most likely isn't a correct solution. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org Last reconfirmed|2008-10-13 19:48:06 |2008-10-17 13:16:23 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37815
[Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
--- Comment #3 from krebbel at gcc dot gnu dot org 2008-10-10 16:56 --- Vladimir could you please have a look. Mainline is still not bootstrapping on S/390 due to this problem. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |vmakarov at gcc dot gnu dot |dot org |org Severity|critical|blocker http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37674] [4.4 Regression] Bootstrap failure due to miscompilation of genattrtab
--- Comment #2 from krebbel at gcc dot gnu dot org 2008-10-06 14:07 --- Just to check whether the propagation of the conflicting hard regs in ira_flatting really is the main problem I've tried the following patch. With that patch the ira branch bootstraps on s390x. Index: gcc/ira-build.c === --- gcc/ira-build.c.orig2008-10-06 11:16:39.0 +0200 +++ gcc/ira-build.c 2008-10-06 14:44:57.0 +0200 @@ -2147,7 +2147,7 @@ ira_flattening (int max_regno_before_emi ira_assert (ALLOCNO_CAP_MEMBER (parent_a) == NULL); if (ALLOCNO_MEM_OPTIMIZED_DEST (a) != NULL) mem_dest_p = true; - if (propagate_p) + /* if (propagate_p)*/ { if (!allocno_propagated_p [ALLOCNO_NUM (parent_a)]) COPY_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (parent_a), I think one reason why this problem does not occur more often and not on other targets is that on S/390 r6 is used as argument register but is also call saved! The conflict between r52 and hard reg r6 is recorded for an instruction which loads the argument for a function call. Since such an INSN is most likely more or less directly followed by a call instruction the missing propagation of conflicting hard regs is papered over by ira_build_conflicts. This function always adds the call clobbered registers to the conflict sets of pseudos which are live across function calls. For r6 on S/390 this does not happen what - at least to my understanding - reveals the bug in ira_flattening. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37674] Bootstrap failure due to miscompilation of genattrtab
-- krebbel at gcc dot gnu dot org changed: What|Removed |Added Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37674] Bootstrap failure due to miscompilation of genattrtab
--- Comment #1 from krebbel at gcc dot gnu dot org 2008-09-30 15:30 --- The failure can currently be seen bootstrapping ira-merge branch (rev.: 140776). configure --enable-shared --with-system-zlib --enable-threads=posix --enable-__cxa_atexit --enable-checking --enable-decimal-float --enable-languages=c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37674] New: Bootstrap failure due to miscompilation of genattrtab
With the patch for PR37535 applied to mainline GCC the bootstrap still fails due to a miscompilation. The problem is that r52 is assigned to r6 what collides with an INSN loading r6 with a parameter for a CALL. I think the problem is created in ira_flattening. Allocno a3 is a parent of a87. For a87 the conflict with r6 is properly recorded. Afterwards ira_flatting merges a87 into a3 without propagating the conflict_hard_regs set. So the conflict with r6 is lost and ira_reassign_pseudos later on assigns r52 to hard reg r6. There is already code in ira_flattening which propagates the conflict sets. But the code is only enabled if propagate_p is true. This in turn seems only to get set if the loop once merged allocnos with different regnos?! I unfortunately don't understand this enough to come up with a patch. So I better leave that to you :) Please contact me if you need more information. I wasn't able to reduce the testcase (genattrtab) since it is quite difficult to see from the code if the miscompile occurred or not. ;; a3(r52,l0) conflicts: a1(r87,l0) .. ;; total conflict hard regs: 0-6 14 ;; conflict hard regs: 0-5 14 ;; a87(r52,l2) conflicts: a86(r48,l2) . ;; total conflict hard regs: 0-6 14 ;; conflict hard regs: 0-6 14 ... Moving ranges of a87r52 to a3r52: [245..248] [234..243] [229..232] [218..227] [173..189] [126..169] ... Try assign 52(a3), cost=268: reassign to 6 -- Summary: Bootstrap failure due to miscompilation of genattrtab Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: critical Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux GCC host triplet: s390x-ibm-linux GCC target triplet: s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37674
[Bug middle-end/37535] [4.4 Regression] gcc/libgcc2.c:404: internal compiler error: Floating point exception
--- Comment #8 from krebbel at gcc dot gnu dot org 2008-09-18 12:02 --- This also seem to break S/390 bootstrap currently. Please see: http://gcc.gnu.org/ml/gcc/2008-09/msg00304.html -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2008-09-18 12:02:59 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37535
[Bug target/36822] [4.4 Regression] ICE in subst_reloads
--- Comment #2 from krebbel at gcc dot gnu dot org 2008-07-31 11:36 --- Fixed. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36822
[Bug target/36822] [4.4 Regression] ICE in subst_reloads
--- Comment #1 from krebbel at gcc dot gnu dot org 2008-07-21 06:55 --- Subject: Bug 36822 Author: krebbel Date: Mon Jul 21 06:54:34 2008 New Revision: 138022 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=138022 Log: 2008-07-21 Andreas Krebbel [EMAIL PROTECTED] PR target/36822 * recog.c (asm_operand_ok): Change the order of the extra memory constraint checks. 2008-07-17 Andreas Krebbel [EMAIL PROTECTED] PR target/36822 * gcc.target/s390/pr36822.c: New testcase. Added: trunk/gcc/testsuite/gcc.target/s390/pr36822.c Modified: trunk/gcc/ChangeLog trunk/gcc/recog.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36822
[Bug target/36745] [4.4 Regression] ICE in gen_reg_rtx, at emit-rtl.c:868
--- Comment #4 from krebbel at gcc dot gnu dot org 2008-07-14 06:57 --- Subject: Bug 36745 Author: krebbel Date: Mon Jul 14 06:56:46 2008 New Revision: 13 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=13 Log: 2008-07-14 Andreas Krebbel [EMAIL PROTECTED] PR target/36745 * config/s390/s390.c: (s390_secondary_reload): Add a secondary reload for symbol refs moved to r0 with -fPIC. (legitimize_pic_address): Use the target register as temporary reg if possible. (emit_symbolic_move): Adjust comment. * config/s390/s390.md (reloadsi_PIC_addr, reloaddi_PIC_addr): New expanders. 2008-07-14 Andreas Krebbel [EMAIL PROTECTED] PR target/36745 * g++.dg/torture/pr36745.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/torture/pr36745.C Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/s390.c trunk/gcc/config/s390/s390.md trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36745
[Bug target/36745] [4.4 Regression] ICE in gen_reg_rtx, at emit-rtl.c:868
--- Comment #3 from krebbel at gcc dot gnu dot org 2008-07-07 12:35 --- The shorter testcase does not fail with -O2 -fPIC on GCC rev. 137553. But I can confirm the ICE with the first example. For large GOTs (4k) we rewrite a symbol reference as a GOTENT relocation in the LEGITIMIZE_ADDRESS hook. A reference to the original SYM_REF stays as REG_EQUAL note. The note is used by GCSE to propagate the SYM_REF directly into the asm operand. So the legitimize_address hook is called for this operand during reload - since the fix needs an additional pseudo it crashes. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2008-07-07 12:35:23 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36745
[Bug target/35311] ICE at postreload.c:392 while building webkit on s390
--- Comment #3 from krebbel at gcc dot gnu dot org 2008-02-25 09:05 --- This problem has already been fixed for GCC 4.3 (#34641). The testcase from that PR didn't fail for GCC 4.2 so I didn't apply the patch on 4.2 as well. But now the patch should be fine for 4.2. I've verified that it fixes your testcase. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2008-02-25 09:05:09 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35311
[Bug target/35258] two memcpy calls merged incorrectly with -O1
--- Comment #6 from krebbel at gcc dot gnu dot org 2008-02-25 15:08 --- Subject: Bug 35258 Author: krebbel Date: Mon Feb 25 15:07:17 2008 New Revision: 132628 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=132628 Log: 2008-02-25 Andreas Krebbel [EMAIL PROTECTED] PR target/35258 * cse.c (cse_insn): Avoid creation of overlapping MEMs. * alias.c (nonoverlapping_memrefs_p): Export for use in other modules. * alias.h (nonoverlapping_memrefs_p): Likewise. 2008-02-25 Andreas Krebbel [EMAIL PROTECTED] PR target/35258 * gcc.dg/pr35258.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr35258.c Modified: trunk/gcc/ChangeLog trunk/gcc/alias.c trunk/gcc/alias.h trunk/gcc/cse.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35258
[Bug target/35258] two memcpy calls merged incorrectly with -O1
--- Comment #5 from krebbel at gcc dot gnu dot org 2008-02-20 12:59 --- The assembler code is broken. In case of an overlap mvc copies one byte at a time and continuing with the next after the first has been written. That's how we use mvc for memsets. The mvcs are merged by the dead store elimination pass. I'll try to understand were it slips through the tests in dse and/or cse. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35258
[Bug target/34641] [4.3 Regression] ICE in reload_cse_simplify_operands, at postreload.c:395
--- Comment #8 from krebbel at gcc dot gnu dot org 2008-01-11 09:03 --- Fixed with: http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00460.html -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34641
[Bug target/34641] [4.3 Regression] ICE in reload_cse_simplify_operands, at postreload.c:395
--- Comment #6 from krebbel at gcc dot gnu dot org 2008-01-10 16:47 --- Subject: Bug 34641 Author: krebbel Date: Thu Jan 10 16:46:26 2008 New Revision: 131445 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=131445 Log: 2008-01-10 Andreas Krebbel [EMAIL PROTECTED] PR middle-end/34641 * reload.c (push_reload): Add assertions. All constants from reg_equiv_constant should have been used for replacing the respective pseudo earlier. (find_reloads_address): Invoke find_reloads_address_part for constant taken from the reg_equiv_constant array. 2008-01-10 Andreas Krebbel [EMAIL PROTECTED] PR middle-end/34641 * g++.dg/torture/pr34641.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/torture/pr34641.C Modified: trunk/gcc/ChangeLog trunk/gcc/reload.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34641
[Bug target/34641] [4.3 Regression] ICE in reload_cse_simplify_operands, at postreload.c:395
--- Comment #5 from krebbel at gcc dot gnu dot org 2008-01-07 17:28 --- The (const_int 3148725999 [0xbbadbeef]) is accepted by legitimate_constant_p since it is expected to end up in the literal pool. But in this case the constant becomes part of a REG_EQUIV note of an insn moving the constant into a pseudo register. Generating a reload for a later insn using the pseudo as memory base register the REG_EQUIV note is used by push_reload to replace the pseudo directly with the constant. The emitted move insn can't be recognized since none of the constraints of the move pattern accepts the large constant. I think push_reload has to make sure that the move pattern to be emitted is able to deal with the constant taken from the reg_equiv_constant array. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2008-01-07 17:28:30 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34641
[Bug target/34081] [4.3 Regression] ICE in s390_function_value, at config/s390/s390.c:7880
--- Comment #10 from krebbel at gcc dot gnu dot org 2007-11-26 17:33 --- Subject: Bug 34081 Author: krebbel Date: Mon Nov 26 17:33:23 2007 New Revision: 130441 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=130441 Log: 2007-11-26 Andreas Krebbel [EMAIL PROTECTED] PR 34081/C++ * c-decl.c (store_parm_decls): Pass 'false' for the new allocate_struct_function parameter. * cgraphunit.c (cgraph_build_static_cdtor): Likewise. * tree-parloops.c (create_loop_fn): Likewise. * function.c (push_function_context_to, push_struct_function, init_function_start): Likewise. (allocate_struct_function): Add boolean parameter. * tree.h (allocate_struct_function): Add boolean parameter. * function.h (struct function): Move returns_struct and returns_pcc_struct to the end of the structure definiton. 2007-11-26 Andreas Krebbel [EMAIL PROTECTED] PR 34081/C++ * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu): Pass 'false' for the new allocate_struct_function parameter. * utils.c (build_function_stub): Likewise. 2007-11-26 Andreas Krebbel [EMAIL PROTECTED] PR 34081/C++ * decl.c (finish_method): Pass 'false' for the new allocate_struct_function parameter. 2007-11-26 Andreas Krebbel [EMAIL PROTECTED] PR 34081/C++ * treetree.c (tree_code_create_function_wrapup): Pass 'false' for the new allocate_struct_function parameter. 2007-11-26 Andreas Krebbel [EMAIL PROTECTED] PR 34081/C++ * decl.c (start_preparsed_function): Pass processing_template_decl for the new allocate_struct_function parameter. 2007-11-26 Andreas Krebbel [EMAIL PROTECTED] PR 34081/C++ * g++.dg/template/dependent-expr6.C: New testcase. Added: trunk/gcc/testsuite/g++.dg/template/dependent-expr6.C Modified: trunk/gcc/ChangeLog trunk/gcc/ada/ChangeLog trunk/gcc/ada/trans.c trunk/gcc/ada/utils.c trunk/gcc/c-decl.c trunk/gcc/cgraphunit.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/function.c trunk/gcc/function.h trunk/gcc/java/ChangeLog trunk/gcc/java/decl.c trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-parloops.c trunk/gcc/tree.h trunk/gcc/treelang/ChangeLog trunk/gcc/treelang/treetree.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34081
[Bug target/34081] [4.3 Regression] ICE in s390_function_value, at config/s390/s390.c:7880
--- Comment #3 from krebbel at gcc dot gnu dot org 2007-11-19 12:43 --- Created an attachment (id=14580) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14580action=view) Smaller testcase -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Attachment #14541|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34081
[Bug target/34081] [4.3 Regression] ICE in s390_function_value, at config/s390/s390.c:7880
--- Comment #4 from krebbel at gcc dot gnu dot org 2007-11-19 13:32 --- The problem occurs since this patch has removed the promotion of result types of a function decl: http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00424.html With this patch the enum Status return type of getStatus is not promoted to int anymore and the enum type tree node is passed to the back end hook. Unfortunately enum types defined within a template declaration are not fully processed when they are defined. According to a comment in finish_enum the full processing is postponed to the point when the template gets instantiated. The back end hook is not called with the error mark node as I wrote in my last comment. The error mark node is created when our back end invokes promote_mode with the not fully processed enum type node and VOIDmode as mode parameter. Why is the back end involved at all? The example doesn't produce any code so why the back end has to bother in which register a value will be returned?! A comment in start_preparsed_function says that this is necessary to have CFUN set up - mmh. I think the bug is that a back end hook is invoked with a tree type node before the front end specific type promotions have been applied. So either we don't involve the back end at all or we promote enums to ints as it was done before. If I understand this correctly the whole layout of the function type is anyway re-done when the template gets instantiated. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34081
[Bug target/34081] [4.3 Regression] ICE in s390_function_value, at config/s390/s390.c:7880
--- Comment #7 from krebbel at gcc dot gnu dot org 2007-11-19 13:42 --- Breakpoint 1, s390_function_value (type=0x2326bb8, mode=VOIDmode) at /build2/gcc-4.3/gcc/config/s390/s390.c:7874 warning: Source file is more recent than executable. 7874 if (type) (gdb) bt #0 s390_function_value (type=0x2326bb8, mode=VOIDmode) at /build2/gcc-4.3/gcc/config/s390/s390.c:7874 #1 0x802c3f7a in hard_function_value (valtype=0x2326bb8, func=value optimized out, fntype=value optimized out, outgoing=value optimized out) at /build2/gcc-4.3/gcc/explow.c:1484 #2 0x8035d63c in aggregate_value_p (exp=0x221bed8, fntype=0x2326ed8) at /build2/gcc-4.3/gcc/function.c:1808 #3 0x8035e7aa in allocate_struct_function (fndecl=0x2325a00) at /build2/gcc-4.3/gcc/function.c:3897 #4 0x8001e3d0 in start_preparsed_function (decl1=0x2325a00, attrs=value optimized out, flags=0) at /build2/gcc-4.3/gcc/cp/decl.c:11171 #5 0x800f1b84 in cp_parser_late_parsing_for_member (parser=0x221c2d0, member_function=0x2325a00) at /build2/gcc-4.3/gcc/cp/parser.c:17216 #6 0x800e9c56 in cp_parser_class_specifier (parser=0x221c2d0) at /build2/gcc-4.3/gcc/cp/parser.c:14224 #7 0x800e1fa4 in cp_parser_type_specifier (parser=0x221c2d0, flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0x3cdc030, is_declaration=1 '\001', declares_class_or_enum=0x3cdbf40, is_cv_qualifier=0x3cdbf3f ) at /build2/gcc-4.3/gcc/cp/parser.c:10535 #8 0x800dd338 in cp_parser_decl_specifier_seq (parser=0x221c2d0, flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0x3cdc030, declares_class_or_enum=0x3cdc08c) at /build2/gcc-4.3/gcc/cp/parser.c:8139 #9 0x800f0d10 in cp_parser_single_declaration (parser=0x221c2d0, checks=0x0, member_p=0 '\0', explicit_specialization_p=0 '\0', friend_p=0x3cdc16f ) at /build2/gcc-4.3/gcc/cp/parser.c:16873 #10 0x800f065c in cp_parser_template_declaration_after_export (parser=0x221c2d0, member_p=0 '\0') at /build2/gcc-4.3/gcc/cp/parser.c:16786 #11 0x800df054 in cp_parser_template_declaration (parser=0x221c2d0, member_p=0 '\0') at /build2/gcc-4.3/gcc/cp/parser.c:9204 #12 0x800dc796 in cp_parser_declaration (parser=0x221c2d0) at /build2/gcc-4.3/gcc/cp/parser.c:7671 #13 0x800dc472 in cp_parser_declaration_seq_opt (parser=0x221c2d0) at /build2/gcc-4.3/gcc/cp/parser.c:7602 #14 0x800d2b42 in cp_parser_translation_unit (parser=0x221c2d0) at /build2/gcc-4.3/gcc/cp/parser.c:2971 #15 0x800fb7e2 in c_parse_file () at /build2/gcc-4.3/gcc/cp/parser.c:20507 #16 0x801cd2ae in c_common_parse_file (set_yydebug=value optimized out) at /build2/gcc-4.3/gcc/c-opts.c:1275 #17 0x80476924 in toplev_main (argc=value optimized out, argv=value optimized out) at /build2/gcc-4.3/gcc/toplev.c:1042 #18 0x02098f08 in __libc_start_main () from /lib64/libc.so.6 #19 0x80004d22 in _start () (gdb) p debug_tree(type) enumeral_type 0x2326bb8 Status type_0 type_6 VOID align 8 symtab 0 alias set -1 canonical type 0x2326bb8 precision 0 values tree_list 0x23234e0 purpose identifier_node 0x232e060 OK bindings (nil) local bindings (nil) value const_decl 0x221bd10 OK type enumeral_type 0x2326bb8 Status readonly constant invariant private VOID file t.cpp line 6 align 1 context record_type 0x2326708 Bar chain const_decl 0x221bda8 NO chain tree_list 0x2323540 purpose identifier_node 0x232e0c0 NO bindings (nil) local bindings (nil) value const_decl 0x221bda8 NO context record_type 0x2326708 Bar chain type_decl 0x2326c80 Status $1 = void -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34081
[Bug target/34081] [4.3 Regression] ICE in s390_function_value, at config/s390/s390.c:7880
--- Comment #2 from krebbel at gcc dot gnu dot org 2007-11-14 10:21 --- The FUNCTION_VALUE back end hook gets invoked with an error mark node - weird. That shouldn't happen I think. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-11-14 10:21:39 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34081
[Bug middle-end/32026] [4.3 Regression] misc.c:899: error: 'const struct real_format' has no member named 'log2_b'
--- Comment #1 from krebbel at gcc dot gnu dot org 2007-05-22 09:16 --- Fixed by: http://gcc.gnu.org/viewcvs?view=revrevision=124938 -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32026
[Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618
--- Comment #4 from krebbel at gcc dot gnu dot org 2007-04-24 13:08 --- Subject: Bug 31641 Author: krebbel Date: Tue Apr 24 13:08:05 2007 New Revision: 124099 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=124099 Log: 2007-04-24 Andreas Krebbel [EMAIL PROTECTED] PR target/31641 * config/s390/s390.c (s390_expand_setmem): Don't ICE for constant length argument of 0 for memset. (s390_expand_movmem, s390_expand_setmem, s390_expand_cmpmem): Use unsigned shift instead of the signed variant. 2007-04-24 Andreas Krebbel [EMAIL PROTECTED] PR target/31641 * gcc.c-torture/compile/pr31641.c: New testcase. Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/s390.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641
[Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618
--- Comment #5 from krebbel at gcc dot gnu dot org 2007-04-24 13:15 --- Subject: Bug 31641 Author: krebbel Date: Tue Apr 24 13:15:11 2007 New Revision: 124100 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=124100 Log: 2007-04-24 Andreas Krebbel [EMAIL PROTECTED] PR target/31641 * config/s390/s390.c (s390_expand_setmem): Don't ICE for constant length argument of 0 for memset. (s390_expand_movmem, s390_expand_setmem, s390_expand_cmpmem): Use unsigned shift instead of the signed variant. 2007-04-24 Andreas Krebbel [EMAIL PROTECTED] PR target/31641 * gcc.c-torture/compile/pr31641.c: New testcase. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/s390/s390.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641
[Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618
--- Comment #6 from krebbel at gcc dot gnu dot org 2007-04-24 13:21 --- Subject: Bug 31641 Author: krebbel Date: Tue Apr 24 13:21:22 2007 New Revision: 124101 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=124101 Log: 2007-04-24 Andreas Krebbel [EMAIL PROTECTED] PR target/31641 * config/s390/s390.c (s390_expand_setmem): Don't ICE for constant length argument of 0 for memset. (s390_expand_movmem, s390_expand_setmem, s390_expand_cmpmem): Use unsigned shift instead of the signed variant. 2007-04-24 Andreas Krebbel [EMAIL PROTECTED] PR target/31641 * gcc.c-torture/compile/pr31641.c: New testcase. Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/config/s390/s390.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641
[Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618
--- Comment #7 from krebbel at gcc dot gnu dot org 2007-04-24 13:23 --- Ulrich approved the patch for 4.1/4.2/4.3. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641
[Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618
--- Comment #2 from krebbel at gcc dot gnu dot org 2007-04-23 12:21 --- In your example the memset function is called with -1 as length argument. When GCC tries to expand this as a builtin function an assertion in the s390 back end function s390_expand_setmem is triggered. Although an ICE is the wrong thing to respond I would consider it a code bug as well. I've proposed a patch to issue a proper error message and call the library function in that situation. The library function probably would write one byte below the target address causing a segfault for a -1 length which is most likely not what the programmer intended but thats what would happen in the -O0 as well. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-04-23 12:21:59 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641
[Bug ada/31576] [4.3 regression] Ada bootstrap error
--- Comment #3 from krebbel at gcc dot gnu dot org 2007-04-17 16:59 --- Subject: Bug 31576 Author: krebbel Date: Tue Apr 17 16:59:24 2007 New Revision: 123915 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=123915 Log: 2007-04-17 Andreas Krebbel [EMAIL PROTECTED] PR ada/31576 * system-linux-alpha.ads: Disable constant condition warning for the Default_Bit_Order variable. * system-linux-s390.ads: Likewise. * system-linux-s390x.ads: Likewise. * system-linux-sparc.ads: Likewise. Modified: trunk/gcc/ada/ChangeLog trunk/gcc/ada/system-linux-alpha.ads trunk/gcc/ada/system-linux-s390.ads trunk/gcc/ada/system-linux-s390x.ads trunk/gcc/ada/system-linux-sparc.ads -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31576
[Bug ada/31576] [regression] Ada bootstrap error
--- Comment #1 from krebbel at gcc dot gnu dot org 2007-04-16 12:38 --- The same happens on s390 and s390x. The constant Default_Bit_Order is definded in system.ads: -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := High_Order_First; With the -gnupg option gnat compains about all checks like: if Default_Bit_Order = High_Order_First then ... with warning: condition is always True I'm by far not an Ada expert but I would say that warning isn't very helpful and in that case and should simply be omitted. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC host triplet||sparc-linux-gnu, s390-ibm- ||linux GCC target triplet|sparc-linux-gnu |sparc-linux-gnu, s390-ibm- ||linux Keywords||build Last reconfirmed|-00-00 00:00:00 |2007-04-16 12:38:14 date|| Summary|[regression] bootstrap error|[regression] Ada bootstrap |on sparc-linux-gnu |error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31576
[Bug middle-end/31127] [4.3 regression] ICE in cse_find_path, at cse.c:5930
--- Comment #7 from krebbel at gcc dot gnu dot org 2007-03-13 13:26 --- ICE can be observed on s390 and s390x as well. http://gcc.gnu.org/ml/gcc/2007-03/msg00357.html -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org Last reconfirmed|2007-03-11 10:15:23 |2007-03-13 13:26:07 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31127
[Bug target/29319] ICE unrecognizable insn: offset too large for larl (breaks glibc)
--- Comment #5 from krebbel at gcc dot gnu dot org 2006-11-27 16:20 --- Subject: Bug 29319 Author: krebbel Date: Mon Nov 27 16:20:24 2006 New Revision: 119254 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=119254 Log: 2006-11-27 Michael Matz [EMAIL PROTECTED] Andreas Krebbel [EMAIL PROTECTED] PR target/29319 * config/s390/predicates.md (larl_operand): Check addend of larl operand to be in range of -/+2GB. * config/s390/s390.c (legitimize_pic_address): Likewise. Changed type of variable even to HOST_WIDE_INT. 2006-11-27 Michael Matz [EMAIL PROTECTED] Andreas Krebbel [EMAIL PROTECTED] PR target/29319 * gcc.dg/20061127-1.c: New testcase. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/20061127-1.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/s390/predicates.md branches/gcc-4_1-branch/gcc/config/s390/s390.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29319
[Bug target/29319] ICE unrecognizable insn: offset too large for larl (breaks glibc)
--- Comment #6 from krebbel at gcc dot gnu dot org 2006-11-27 16:27 --- Subject: Bug 29319 Author: krebbel Date: Mon Nov 27 16:26:53 2006 New Revision: 119255 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=119255 Log: 2006-11-27 Michael Matz [EMAIL PROTECTED] Andreas Krebbel [EMAIL PROTECTED] PR target/29319 * config/s390/predicates.md (larl_operand): Check addend of larl operand to be in range of -/+2GB. * config/s390/s390.c (legitimize_pic_address): Likewise. Changed type of variable even to HOST_WIDE_INT. 2006-11-27 Michael Matz [EMAIL PROTECTED] Andreas Krebbel [EMAIL PROTECTED] PR target/29319 * gcc.dg/20061127-1.c: New testcase. Added: branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/20061127-1.c Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/config/s390/predicates.md branches/gcc-4_2-branch/gcc/config/s390/s390.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29319
[Bug target/29319] ICE unrecognizable insn: offset too large for larl (breaks glibc)
--- Comment #7 from krebbel at gcc dot gnu dot org 2006-11-27 16:34 --- Subject: Bug 29319 Author: krebbel Date: Mon Nov 27 16:34:19 2006 New Revision: 119256 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=119256 Log: 2006-11-27 Michael Matz [EMAIL PROTECTED] Andreas Krebbel [EMAIL PROTECTED] PR target/29319 * config/s390/predicates.md (larl_operand): Check addend of larl operand to be in range of -/+2GB. * config/s390/s390.c (legitimize_pic_address): Likewise. Changed type of variable even to HOST_WIDE_INT. 2006-11-27 Michael Matz [EMAIL PROTECTED] Andreas Krebbel [EMAIL PROTECTED] PR target/29319 * gcc.dg/20061127-1.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/20061127-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/predicates.md trunk/gcc/config/s390/s390.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29319
[Bug tree-optimization/25737] [4.1/4.2 Regression] ACATS c974001 c974013 hang with struct aliasing
--- Comment #30 from krebbel at gcc dot gnu dot org 2006-09-21 13:56 --- All three (c974001, c974013 and cb20001) do not fail on s390x anymore since my patch removing the CLOBBERs for eh registers has been applied: http://gcc.gnu.org/ml/gcc-patches/2006-09/msg00498.html If the analysis in this PR is correct it seems unlikely to me that the patch is directly related to the cause of the problem. Maybe it simply hides the real problem somehow. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25737
[Bug tree-optimization/25737] ACATS c974001 c974013 hang with struct aliasing
--- Comment #33 from krebbel at gcc dot gnu dot org 2006-09-21 14:49 --- Ok. I wasn't aware of this. On s390 these testcases failed even without the struct-aliasing patch. So obviously it was just a coincidence that the same testcases failed on s390 (plus one more). Sorry if I made the confusion complete. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25737
[Bug target/24367] [4.0/4.1/4.2 Regression] unrecognizable insn with -fPIC -O2 -funroll-loops
--- Comment #6 from krebbel at gcc dot gnu dot org 2006-08-31 07:43 --- Subject: Bug 24367 Author: krebbel Date: Thu Aug 31 07:43:36 2006 New Revision: 116599 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=116599 Log: 2006-08-31 Andreas Krebbel [EMAIL PROTECTED] PR target/24367 * config/s390/s390.md (movsi, movdi expander): Accept rtxes like r12 + SYMBOLIC_CONST. 2006-08-31 Andreas Krebbel [EMAIL PROTECTED] PR target/24367 * gcc.dg/pr24367.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr24367.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/s390.md trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24367
[Bug target/24367] [4.0/4.1/4.2 Regression] unrecognizable insn with -fPIC -O2 -funroll-loops
--- Comment #7 from krebbel at gcc dot gnu dot org 2006-08-31 07:50 --- Subject: Bug 24367 Author: krebbel Date: Thu Aug 31 07:50:19 2006 New Revision: 116600 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=116600 Log: 2006-08-31 Andreas Krebbel [EMAIL PROTECTED] PR target/24367 * config/s390/s390.md (movsi, movdi expander): Accept rtxes like r12 + SYMBOLIC_CONST. 2006-08-31 Andreas Krebbel [EMAIL PROTECTED] PR target/24367 * gcc.dg/pr24367.c: New testcase. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr24367.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/s390/s390.md branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24367
[Bug target/24367] [4.0/4.1/4.2 Regression] unrecognizable insn with -fPIC -O2 -funroll-loops
--- Comment #8 from krebbel at gcc dot gnu dot org 2006-08-31 08:06 --- Although the bug is latent in gcc 4.0 as well I've applied the patch to 4.1 and 4.2 only. I could not reproduce a failure with gcc 4.0 so I've left it as is rather than risking new problems. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24367
[Bug target/24367] [4.0/4.1/4.2 Regression] unrecognizable insn with -fPIC -O2 -funroll-loops
--- Comment #4 from krebbel at gcc dot gnu dot org 2006-08-22 15:17 --- Happens on mainline as well. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2006-08-15 12:05:42 |2006-08-22 15:17:25 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24367
[Bug tree-optimization/25737] [4.1/4.2 Regression] ACATS c974001 c974013 hang with struct aliasing
--- Comment #29 from krebbel at gcc dot gnu dot org 2006-06-23 15:16 --- On s390x c974001, c974013 and cb20001 run into a infinite loop with current mainline. At least the first two look related - not sure about the third. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org Last reconfirmed|2006-03-22 09:53:52 |2006-06-23 15:16:14 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25737
[Bug middle-end/27959] [4.1 regression] s390x miscompilation due to clobbering literal pool base reg
--- Comment #4 from krebbel at gcc dot gnu dot org 2006-06-14 09:24 --- Subject: Bug 27959 Author: krebbel Date: Wed Jun 14 09:24:44 2006 New Revision: 114636 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=114636 Log: 2006-06-14 Andreas Krebbel [EMAIL PROTECTED] PR middle-end/27959 * reload1.c (reload): Remove registers returned by update_eliminables from used_spill_regs. 2006-06-14 Andreas Krebbel [EMAIL PROTECTED] PR middle-end/27959 * gcc.dg/pr27959.c: New testcase. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr27959.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/reload1.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27959
[Bug middle-end/27959] [4.1 regression] s390x miscompilation due to clobbering literal pool base reg
--- Comment #5 from krebbel at gcc dot gnu dot org 2006-06-14 14:20 --- Subject: Bug 27959 Author: krebbel Date: Wed Jun 14 14:19:54 2006 New Revision: 114640 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=114640 Log: 2006-06-14 Andreas Krebbel [EMAIL PROTECTED] PR middle-end/27959 * reload1.c (reload): Remove registers returned by update_eliminables from used_spill_regs. 2006-06-14 Andreas Krebbel [EMAIL PROTECTED] PR middle-end/27959 * gcc.dg/pr27959.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr27959.c Modified: trunk/gcc/ChangeLog trunk/gcc/reload1.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27959
[Bug middle-end/27959] [4.1 regression] s390x miscompilation due to clobbering literal pool base reg
--- Comment #6 from krebbel at gcc dot gnu dot org 2006-06-14 14:22 --- Patch committed to mainline and gcc 4.1 branch. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27959
[Bug target/27959] [4.1 regression] s390x miscompilation due to clobbering literal pool base reg
--- Comment #3 from krebbel at gcc dot gnu dot org 2006-06-09 11:41 --- On s390 we use a trick to make the literal pool base register available on demand. It is defined as eliminable register which can be eliminated to itself with offset 0. When a reload round finds a r13 (literal pool base) it asks the back end whether it can be eliminated and the back end says no. So reload throws any pseudos out of r13 and marks it as bad_spill_regs_global hence it won't be used as a reload register. In your example there is no literal pool reference when entering reload. So the initial elimination step marks r13 as eliminable and therefore free to be used in reloads and it actually is used in a reload. In the second round reload forces a constant into the literal pool what creates a literal pool reference. When update_eliminables is called r13 is marked as cant_eliminate and the respective bit in bad_spill_regs_global is set. So far so good. Unfortunately reload seems to think that registers which were once good to be used in reloads will be good for future reloads as well - thats my impression at least. The bitmap used_spill_regs is not reset between the reload rounds. used_spill_regs is used in finish_spills to recalculate the spill_regs array which then contains r13 since it was used as reload reg in the first round. The following patch deletes all registers which are recognized by update_eliminables as eliminable_previous but cant_eliminate now from the used_spill_regs bitmap and fixes your testcase. Since reload is always a bit dodgy and tends to be unpredictable I would be interested in Ulrichs opinion about the patch. He knows much better whats going on in reload. So Ulrich do think this makes sense? Index: gcc/reload1.c === *** gcc/reload1.c.orig 2006-06-09 13:12:39.0 +0200 --- gcc/reload1.c 2006-06-09 13:14:54.0 +0200 *** reload (rtx first, int global) *** 987,992 --- 987,994 HARD_REG_SET to_spill; CLEAR_HARD_REG_SET (to_spill); update_eliminables (to_spill); + AND_COMPL_HARD_REG_SET(used_spill_regs, to_spill); + for (i = 0; i FIRST_PSEUDO_REGISTER; i++) if (TEST_HARD_REG_BIT (to_spill, i)) { -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-06-09 11:41:57 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27959
[Bug rtl-optimization/27661] ICE in subst_reloads
--- Comment #2 from krebbel at gcc dot gnu dot org 2006-05-18 16:59 --- Thanks for your comprehensive debugging! At first glance I would say reload should take a word_mode register and reload the constant. The code added by your patch to legitimate_address_p says that a single number is not a valid address which isn't true. We also allow reg+reg+constant in legitimate_address_p and rely on reload to fix this for Q and S constraints and I think the same should happen here as well. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2006-05-18 16:59:37 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27661
[Bug rtl-optimization/26847] New: Missed optimization in simplify_plus_minus - regression against 4.1.0
copied from: http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00812.html Hi Paolo, with your patch: http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01718.html simplify_plus_minus isn't able anymore to simplify things like (r1 + 8) - r1. The function is left at: if (!canonicalized) { int n_constants = 0; for (i = 0; i n_ops; i++) if (GET_CODE (ops[i].op) == CONST_INT) n_constants++; if (n_constants = 1) return NULL_RTX; } because only a single constant was found and no canonicalization took place. Your patch changed: if (n_ops = 2 !force) return NULL_RTX; to: gcc_assert (n_ops = 2); if (!canonicalized) return NULL_RTX; Which was later on changed by Alan Modra with: http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00015.html to the version mentioned above. The reason here was that expressions like reg + c1 + c2 were not simplified anymore. So the new version exits always if the initial loop couldn't do any canonicalization work and only 0 or 1 constants are left. What prevents simplification in all those cases. ... As Roger Sayle pointed out the patch I've proposed in the email isn't the proper fix for this issue. Paolo Bonzini already proposed a solution in: http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00884.html Thats why I'll assign the bug to him. -- Summary: Missed optimization in simplify_plus_minus - regression against 4.1.0 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: bonzini at gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: s390x-ibm-linux-gnu GCC host triplet: s390x-ibm-linux-gnu GCC target triplet: s390x-ibm-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26847
[Bug target/25864] Enable IBM long double format in 32-bit PowerPC Linux
--- Comment #8 from krebbel at gcc dot gnu dot org 2006-02-03 07:44 --- Subject: Bug 25864 Author: krebbel Date: Fri Feb 3 07:44:12 2006 New Revision: 110538 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110538 Log: 2006-02-03 Andreas Krebbel [EMAIL PROTECTED] Ulrich Weigand [EMAIL PROTECTED] PR target/25864 * config/s390/2084.md (x_fsimptf, x_fmultf, x_fdivtf, x_floadtf, x_ftrunctf, x_ftruncdf): New insn reservations. * config/s390/fixdfdi.h (__fixunstfdi, __fixtfdi): New functions. * config/s390/s390.c (struct processor_costs): Add mxbr, sqxbr, dxbr and dxr fields. (z900_cost, z990_cost, z9_109_cost): Values for the new fields added. (s390_rtx_costs): Use the new fields to calculate rtx costs. (s390_secondary_input_reload_class, s390_secondary_output_reload_class): Define secondary reloads for TFmode moves. (constant_modes): Add TFmode. (NR_C_MODES): Set to 8. * config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): Add __LONG_DOUBLE_128__ builtin define. (LONG_DOUBLE_TYPE_SIZE): Set to 128 or 64. (LIBGCC2_LONG_DOUBLE_TYPE_SIZE, WIDEST_HARDWARE_FP_SIZE): Define. (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, CLASS_MAX_NREGS, CANNOT_CHANGE_MODE_CLASS): Consider TFmode. * config/s390/s390.md (type attribute): Add fsimptf, floadtf, fmultf, fdivtf, fsqrttf, ftrunctf, ftruncdf as possible values. (FPR mode macro): Add TFmode. (DSF mode macro): New. (de, dee mode attributes): Removed. (xde, xdee, RRe, RXe, Rf mode attributes): New. (*cmpmode_ccs_0, *cmpmode_ccs_0_ibm, *cmpmode_ccs, *cmpmode_ccs_ibm, fix_truncFPR:modeGPR:mode2_ieee, floatdimode2, floatsimode2_ieee, *addmode3, *addmode3_cc, *addmode3_cconly, *addmode3_ibm, *submode3, *submode3_cc, *submode3_cconly, *submode3_ibm, *mulmode3_ibm, *fmaddmode, *fmsubmode, *divmode3, *divmode3_ibm, *negmode2_cc, *negmode2_cconly, *negmode2, *negmode2_ibm, *absmode2_cc, *absmode2_cconly, *absmode2, *absmode2_ibm, *negabsmode2_cc, *negabsmode2_cconly, *negabsmode2, sqrtmode2): Changed de to xde. R constraint replaced by Rf. (*mulmode3): Changed dee to xdee. R constraint replaced by Rf. (fix_truncFPR:modedi2): 'FPR:' removed. (*fmaddmode, *fmsubmode): FPR mode replaced by DSF. (*movtf_64, *movtf_31): New insn definitions followed by 5 splitters. (movtf, reload_outtf, reload_intf, trunctfdf2, trunctfsf2, extenddftf2, extendsftf2): New expanders. (*trunctfdf2_ieee, *trunctfdf2_ibm, *trunctfsf2_ieee, *trunctfsf2_ibm, *extenddftf2_ieee, *extenddftf2_ibm, *extendsftf2_ieee, *extendsftf2_ibm): New insn patterns. * config/s390/s390.opt (mlong-double-128, mlong-double-64): New options. * config/s390/t-crtstuff (TARGET_LIBGCC2_CFLAGS): Macro defined. * config/s390/libgcc-glibc.ver (__divtc3, __multc3, __powitf2, __fixtfti, __fixunstfti, __floattitf, __fixtfdi, __fixunstfdi, __floatditf): Add a GCC_4.1.0 symbol version tag. * doc/invoke.texi (-mlong-double-128, -mlong-double-64): Document the new options. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/s390/2084.md branches/gcc-4_1-branch/gcc/config/s390/fixdfdi.h branches/gcc-4_1-branch/gcc/config/s390/libgcc-glibc.ver branches/gcc-4_1-branch/gcc/config/s390/s390.c branches/gcc-4_1-branch/gcc/config/s390/s390.h branches/gcc-4_1-branch/gcc/config/s390/s390.md branches/gcc-4_1-branch/gcc/config/s390/s390.opt branches/gcc-4_1-branch/gcc/config/s390/t-crtstuff branches/gcc-4_1-branch/gcc/doc/invoke.texi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25864
[Bug target/25864] Enable IBM long double format in 32-bit PowerPC Linux
--- Comment #9 from krebbel at gcc dot gnu dot org 2006-02-03 07:53 --- Subject: Bug 25864 Author: krebbel Date: Fri Feb 3 07:52:57 2006 New Revision: 110539 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110539 Log: 2006-02-03 Andreas Krebbel [EMAIL PROTECTED] Ulrich Weigand [EMAIL PROTECTED] PR target/25864 * config/s390/2084.md (x_fsimptf, x_fmultf, x_fdivtf, x_floadtf, x_ftrunctf, x_ftruncdf): New insn reservations. * config/s390/fixdfdi.h (__fixunstfdi, __fixtfdi): New functions. * config/s390/s390.c (struct processor_costs): Add mxbr, sqxbr, dxbr and dxr fields. (z900_cost, z990_cost, z9_109_cost): Values for the new fields added. (s390_rtx_costs): Use the new fields to calculate rtx costs. (s390_secondary_input_reload_class, s390_secondary_output_reload_class): Define secondary reloads for TFmode moves. (constant_modes): Add TFmode. (NR_C_MODES): Set to 8. * config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): Add __LONG_DOUBLE_128__ builtin define. (LONG_DOUBLE_TYPE_SIZE): Set to 128 or 64. (LIBGCC2_LONG_DOUBLE_TYPE_SIZE, WIDEST_HARDWARE_FP_SIZE): Define. (HARD_REGNO_NREGS, HARD_REGNO_MODE_OK, CLASS_MAX_NREGS, CANNOT_CHANGE_MODE_CLASS): Consider TFmode. * config/s390/s390.md (type attribute): Add fsimptf, floadtf, fmultf, fdivtf, fsqrttf, ftrunctf, ftruncdf as possible values. (FPR mode macro): Add TFmode. (DSF mode macro): New. (de, dee mode attributes): Removed. (xde, xdee, RRe, RXe, Rf mode attributes): New. (*cmpmode_ccs_0, *cmpmode_ccs_0_ibm, *cmpmode_ccs, *cmpmode_ccs_ibm, fix_truncFPR:modeGPR:mode2_ieee, floatdimode2, floatsimode2_ieee, *addmode3, *addmode3_cc, *addmode3_cconly, *addmode3_ibm, *submode3, *submode3_cc, *submode3_cconly, *submode3_ibm, *mulmode3_ibm, *fmaddmode, *fmsubmode, *divmode3, *divmode3_ibm, *negmode2_cc, *negmode2_cconly, *negmode2, *negmode2_ibm, *absmode2_cc, *absmode2_cconly, *absmode2, *absmode2_ibm, *negabsmode2_cc, *negabsmode2_cconly, *negabsmode2, sqrtmode2): Changed de to xde. R constraint replaced by Rf. (*mulmode3): Changed dee to xdee. R constraint replaced by Rf. (fix_truncFPR:modedi2): 'FPR:' removed. (*fmaddmode, *fmsubmode): FPR mode replaced by DSF. (*movtf_64, *movtf_31): New insn definitions followed by 5 splitters. (movtf, reload_outtf, reload_intf, trunctfdf2, trunctfsf2, extenddftf2, extendsftf2): New expanders. (*trunctfdf2_ieee, *trunctfdf2_ibm, *trunctfsf2_ieee, *trunctfsf2_ibm, *extenddftf2_ieee, *extenddftf2_ibm, *extendsftf2_ieee, *extendsftf2_ibm): New insn patterns. * config/s390/s390.opt (mlong-double-128, mlong-double-64): New options. * config/s390/t-crtstuff (TARGET_LIBGCC2_CFLAGS): Macro defined. * config/s390/libgcc-glibc.ver (__divtc3, __multc3, __powitf2, __fixtfti, __fixunstfti, __floattitf, __fixtfdi, __fixunstfdi, __floatditf): Add a GCC_4.1.0 symbol version tag. * doc/invoke.texi (-mlong-double-128, -mlong-double-64): Document the new options. Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/2084.md trunk/gcc/config/s390/fixdfdi.h trunk/gcc/config/s390/libgcc-glibc.ver trunk/gcc/config/s390/s390.c trunk/gcc/config/s390/s390.h trunk/gcc/config/s390/s390.md trunk/gcc/config/s390/s390.opt trunk/gcc/config/s390/t-crtstuff trunk/gcc/doc/invoke.texi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25864
[Bug middle-end/25724] Emits call to __cmpdi2 for long long comparison
--- Comment #6 from krebbel at gcc dot gnu dot org 2006-01-09 18:26 --- As far as I know the kernel guys rely on the fact that gcc can handle DImode operations without calling libgcc. As Richard pointed out this only fails in this case because the conditional jump is emitted differently for case nodes. A normal DImode compare (on 32bit) is split into SImode compares before emit_cmp_and_jump_insns is called. This is done by do_jump_by_parts_equality. emit_case_nodes in turn calls do_jump_if_equal which calls emit_cmp_and_jump_insns with DImode operands. So I think using the dojump.c machinery in emit_case_nodes should be the way to go - right?! -- krebbel at gcc dot gnu dot org changed: What|Removed |Added CC||krebbel at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25724
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #21 from krebbel at gcc dot gnu dot org 2005-12-16 09:02 --- Subject: Bug 24823 Author: krebbel Date: Fri Dec 16 09:02:49 2005 New Revision: 108631 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=108631 Log: 2005-12-16 Andreas Krebbel [EMAIL PROTECTED] PR 24823 * flow.c (mark_used_dest_regs): New function. (mark_used_regs): Call mark_used_dest_regs. 2005-12-16 Andreas Krebbel [EMAIL PROTECTED] PR 24823 * gfortran.dg/pr24823.f: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pr24823.f Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/flow.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #22 from krebbel at gcc dot gnu dot org 2005-12-16 09:09 --- Subject: Bug 24823 Author: krebbel Date: Fri Dec 16 09:09:37 2005 New Revision: 108632 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=108632 Log: 2005-12-16 Andreas Krebbel [EMAIL PROTECTED] PR 24823 * flow.c (mark_used_dest_regs): New function. (mark_used_regs): Call mark_used_dest_regs. 2005-12-16 Andreas Krebbel [EMAIL PROTECTED] PR 24823 * gfortran.dg/pr24823.f: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr24823.f Modified: trunk/gcc/ChangeLog trunk/gcc/flow.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #23 from krebbel at gcc dot gnu dot org 2005-12-16 09:18 --- Fixed. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #10 from krebbel at gcc dot gnu dot org 2005-12-08 08:32 --- Subject: Bug 25268 Author: krebbel Date: Thu Dec 8 08:32:34 2005 New Revision: 108216 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=108216 Log: 2005-12-08 Andreas Krebbel [EMAIL PROTECTED] Jakub Jelinek [EMAIL PROTECTED] PR target/25268 * config/s390/s390.c (s390_decompose_shift_count): Remove BITS argument. Don't drop outer ANDs. (s390_extra_constraint_str, print_shift_count_operand): Adjust callers. * config/s390/s390-protos.h (s390_decompose_shift_count): Adjust prototype. * config/s390/predicates.md (setmem_operand): Remove. (shift_count_operand): Rename to... (shift_count_or_setmem_operand): ... this. Adjust s390_decompose_shift_count caller. * config/s390/s390.md (shiftdi3_31_and, shiftdi3_64_and, ashrdi3_cc_31_and, ashrdi3_cconly_31_and, ashrdi3_31_and, ashrdi3_cc_64_and, ashrdi3_cconly_64_and, ashrdi3_64_and, shiftsi3_and, ashrsi3_cc_and, ashrsi3_cconly_and, ashrsi3_and, rotlmode3_and, setmem_long_and): New insns. (shiftdi3_31, shiftdi3_64, ashrdi3_cc_31, ashrdi3_cconly_31, ashrdi3_31, ashrdi3_cc_64, ashrdi3_cconly_64, ashrdi3_64, shiftsi3, ashrsi3_cc, ashrsi3_cconly, ashrsi3, rotlmode3, shiftdi3, ashrdi3): Use shift_count_or_setmem_operand instead of shift_count_operand. (setmem_long): Use shift_count_or_setmem_operand instead of setmem_operand. 2005-12-08 Andreas Krebbel [EMAIL PROTECTED] Jakub Jelinek [EMAIL PROTECTED] PR target/25268 * gcc.c-torture/compile/20051207-1.c: New test. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/s390/predicates.md branches/gcc-4_1-branch/gcc/config/s390/s390-protos.h branches/gcc-4_1-branch/gcc/config/s390/s390.c branches/gcc-4_1-branch/gcc/config/s390/s390.md branches/gcc-4_1-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #11 from krebbel at gcc dot gnu dot org 2005-12-08 08:33 --- Subject: Bug 25268 Author: krebbel Date: Thu Dec 8 08:33:39 2005 New Revision: 108217 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=108217 Log: 2005-12-08 Andreas Krebbel [EMAIL PROTECTED] Jakub Jelinek [EMAIL PROTECTED] PR target/25268 * gcc.c-torture/compile/20051207-1.c: New test. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/compile/20051207-1.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #12 from krebbel at gcc dot gnu dot org 2005-12-08 08:56 --- Subject: Bug 25268 Author: krebbel Date: Thu Dec 8 08:56:24 2005 New Revision: 108220 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=108220 Log: 2005-12-08 Andreas Krebbel [EMAIL PROTECTED] Jakub Jelinek [EMAIL PROTECTED] PR target/25268 * config/s390/s390.c (s390_decompose_shift_count): Remove BITS argument. Don't drop outer ANDs. (s390_extra_constraint_str, print_shift_count_operand): Adjust callers. * config/s390/s390-protos.h (s390_decompose_shift_count): Adjust prototype. * config/s390/predicates.md (setmem_operand): Remove. (shift_count_operand): Rename to... (shift_count_or_setmem_operand): ... this. Adjust s390_decompose_shift_count caller. * config/s390/s390.md (shiftdi3_31_and, shiftdi3_64_and, ashrdi3_cc_31_and, ashrdi3_cconly_31_and, ashrdi3_31_and, ashrdi3_cc_64_and, ashrdi3_cconly_64_and, ashrdi3_64_and, shiftsi3_and, ashrsi3_cc_and, ashrsi3_cconly_and, ashrsi3_and, rotlmode3_and, setmem_long_and): New insns. (shiftdi3_31, shiftdi3_64, ashrdi3_cc_31, ashrdi3_cconly_31, ashrdi3_31, ashrdi3_cc_64, ashrdi3_cconly_64, ashrdi3_64, shiftsi3, ashrsi3_cc, ashrsi3_cconly, ashrsi3, rotlmode3, shiftdi3, ashrdi3): Use shift_count_or_setmem_operand instead of shift_count_operand. (setmem_long): Use shift_count_or_setmem_operand instead of setmem_operand. 2005-12-08 Andreas Krebbel [EMAIL PROTECTED] Jakub Jelinek [EMAIL PROTECTED] PR target/25268 * gcc.c-torture/compile/20051207-1.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/20051207-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/s390/predicates.md trunk/gcc/config/s390/s390-protos.h trunk/gcc/config/s390/s390.c trunk/gcc/config/s390/s390.md trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #4 from krebbel at gcc dot gnu dot org 2005-12-07 11:26 --- (In reply to comment #3) BTW, is the s390 hw really masking the shift count with 63 for all insns, or just the DImode shifts and with 31 for SImode shifts? On S/390 all shift count operands are masked with 63. SImode as well as DImode shifts. There are actually two target macros trying to address this issue: SHIFT_COUNT_TRUNCATED and TARGET_SHIFT_TRUNCATION_MASK. If you set SHIFT_COUNT_TRUNCATED to 1 the default used as truncation mask will be GET_MODE_BITSIZE (mode) - 1 which is what you proposed. In the S/390 case we need a truncation mask of always 63 what I tried to introduce with this patch: http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00207.html But this unfortunately doesn't help to get rid of pointless ANDs because TARGET_SHIFT_TRUNCATION_MASK is defined to be valid only for SHIFTs coming from named patterns. That makes it unusable for combine because it can't determine whether a SHIFT was generated due to a middle end optimization or due to a named pattern. For more information see (especially the mail from Richard Sandiford): http://gcc.gnu.org/ml/gcc/2005-04/msg01066.html If sometimes in the future all middle end optimizations touching SHIFTs will be aware of the target macro we can remove the duplicated shift pattern I'm about to introduce in the S/390 back end. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #7 from krebbel at gcc dot gnu dot org 2005-12-07 16:26 --- Created an attachment (id=10435) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10435action=view) Patch without testcase I've bootstrapped the attached patch on s390 and s390x without testsuite regressions. The patch matches almost exactly what you did. Additionally I've merged the predicates setmem_operand and shift_count_operand because after that change they contain the same code. And the setmem_long pattern should as well be duplicated checking for a mask of 255. As testcase I think the smaller testcase I posted would be preferable. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |krebbel at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #9 from krebbel at gcc dot gnu dot org 2005-12-07 17:33 --- (In reply to comment #8) Ok (not sure if it really is a good idea to make the *_operand names that long), Mmmh you are right but I couldn't think of a better name that moment. just I'm afraid ashrdi3_cc_64_and, ashrdi3_cc_31_and and ashrsi3_cc_and will never match in your patch, because you haven't replaced (match_dup 2) with (and:SI (match_dup 2) (match_dup 3)). Oops. Right - thanks for fixing this. Attaching updated version of your patch with this and testcase incorporated. Thanks I've posted your updated version on gcc-patches and added your name to the changelog entry. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug target/25268] ICE on lshrdi3_31 pattern
--- Comment #1 from krebbel at gcc dot gnu dot org 2005-12-06 14:33 --- Shorter testcase: long long foo (long long x, int y) { return x ((y + 1) 63); } The count operand of a shift instruction is a somewhat weird thing on S/390. It is basically an address accepting the sum of an address register and a constant. To the resulting value an AND mask of 63 is applied. Looking for an easy way to get rid of pointless ANDs on a shift count operand we've defined an 'Y' address constraint and a predicate to accept these ANDs although our legitimize_address_p does not! We were aware that this could potentially cause trouble but we found it working because find_reloads_address strips ANDs before handling the address parts. Unfortunately find_reloads_address fails if there is actually a constant addend present. If legitimize_address_p said no to an address consisting of a register + constant it is assumed that the constant value is not valid as displacement and is reloaded into a register if the machine supports reg + reg addresses. So we end up with: r1 = c; r3 (r1 + r2); not a valid shift count operand The only way to fix this seems to be making the 'Y' constraint and the shift_count_operand predicate to reject ANDs again and duplicating the shift patterns in order to have a variant including the AND in the insn pattern. I will come up with a patch as soon as possible. -- krebbel at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2005-12-06 14:33:40 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25268
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #18 from krebbel at gcc dot gnu dot org 2005-12-05 07:57 --- (In reply to comment #17) Oh, and another case where we can get the parallel is for returning 128bit structs on x86_64. I've posted a patch on Nov 28th which should handle these cases correctly: http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01933.html Richard Guenther tested the patch on x86_64 and I did on s390, s390x and i686. The patch is waiting for approval. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug rtl-optimization/25115] [4.2 Regression] Segmentation fault in pre_insert_copy_insn
--- Comment #6 from krebbel at gcc dot gnu dot org 2005-11-28 15:34 --- Created an attachment (id=10354) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10354action=view) Testcase which failes on S/390 64bit with -O2 This testcase is reduced from gengtype-lex.c. Due to this bug it is currently not possible to bootstrap gcc dfp-branch on s390x (64bit). The patch proposed by Paolo Bonzini fixes the problem and produces slightly better code resulting in five assembler instructions less. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25115
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #11 from krebbel at gcc dot gnu dot org 2005-11-21 09:29 --- Ok, knowing that this may only happen if the return value of a function has a complex type a trivial fix could look like this: Index: gcc/flow.c === *** gcc/flow.c.orig 2005-11-15 14:21:23.0 +0100 --- gcc/flow.c 2005-11-21 09:34:05.0 +0100 *** mark_used_regs (struct propagate_block_i *** 4020,4026 recursively scan the value being stored. */ if ((GET_CODE (testreg) == PARALLEL ! GET_MODE (testreg) == BLKmode) || (REG_P (testreg) (regno = REGNO (testreg), ! (regno == FRAME_POINTER_REGNUM --- 4020,4027 recursively scan the value being stored. */ if ((GET_CODE (testreg) == PARALLEL ! (GET_MODE (testreg) == BLKmode !|| COMPLEX_MODE_P (GET_MODE (testreg || (REG_P (testreg) (regno = REGNO (testreg), ! (regno == FRAME_POINTER_REGNUM This fixes the problem for my x86_64 crosscompiler but certainly needs further testing. Could somebody with an Intel 64bit system try to bootstrap this? Bootstraps on s390 wouldn't help here because we do not return complex types that way. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #13 from krebbel at gcc dot gnu dot org 2005-11-21 16:07 --- I don't have an Intel 64bit machine, but I can do a bootstrap on a x86_64 machine with this patch. Ups. That's what I was trying to suggest - an unusual typo isn't it? ;-) Thanks for taking care of this! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug rtl-optimization/24823] [4.1/4.2 Regression] ICE in insert_save, at caller-save.c:719
--- Comment #16 from krebbel at gcc dot gnu dot org 2005-11-21 17:36 --- (In reply to comment #15) (In reply to comment #14) The testcase to get that construct is: Compiling with -mpowerpc64 to get the mixed mode. I would not doubt that the arm failure is a similar issue but not with complex types. So maybe we can remove the mode check: GET_MODE (testreg) == BLKmode) The only problem I could think of is when we have a MEM within the PARALLEL, then we should rather fall through to the code calling mark_used_regs recursively in order to mark the regs holding the address as used. So perhaps it is necessary to make sure that the PARALLEL only contains regs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24823
[Bug fortran/24887] New: ICE in fold-const.c
To reproduce: Compile the three files with: f951 timeinterval.f90 f951 time.f90 f951 fold.f90 clockadvance fold_convert.f90:13: internal compiler error: in fold_convert, at fold.c:2028 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. Reproduced with the following gccs: gcc -v: Using built-in specs. Target: s390x-ibm-linux Configured with: /build/gcc-4.1/configure --prefix=/build/gcc-4.1-64bit-install --enable-shared --with-system-zlib --enable-threads=posix --enable-__cxa_atexit --program-suffix=-4.1 Thread model: posix gcc version 4.1.0 20051115 (experimental) Using built-in specs. Target: s390x-redhat-linux Configured with: /build2/gcc-4.0/configure --prefix=/build2/gcc-4.0-64bit-install --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f95,ada --host=s390x-redhat-linux --program-suffix=-4.0 Thread model: posix gcc version 4.0.3 20051017 (prerelease) Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.0.2 (Debian 4.0.2-2) Debug output produced on s390x: Breakpoint 1, fold_convert (type=0x2286160, arg=0x22071e0) at /build/gcc-4.1/gcc/fold.c:2028 2028 gcc_unreachable (); (gdb) p debug_generic_expr(type) struct timetype $1 = void (gdb) p debug_generic_expr(arg) timeinc (clockD.547-currD.543, clockD.547-stepD.542) $2 = void (gdb) bt #0 fold_convert (type=0x2286160, arg=0x22071e0) at /build/gcc-4.1/gcc/fold.c:2028 #1 0x800726c4 in gfc_trans_scalar_assign (lse=0x3c30fc8, rse=0x3c30f78, type=Variable type is not available. ) at /build/gcc-4.1/gcc/fortran/trans-expr.c:2579 #2 0x800770a4 in gfc_trans_assignment (expr1=0x80642e30, expr2=0x806430d0) at /build/gcc-4.1/gcc/fortran/trans-expr.c:2761 #3 0x80060b90 in gfc_trans_code (code=0x80641c90) at /build/gcc-4.1/gcc/fortran/trans.c:493 #4 0x80071736 in gfc_generate_function_code (ns=0x80641430) at /build/gcc-4.1/gcc/fortran/trans-decl.c:2621 #5 0x80060118 in gfc_generate_module_code (ns=0x80608520) at /build/gcc-4.1/gcc/fortran/trans.c:688 #6 0x80042796 in gfc_parse_file () at /build/gcc-4.1/gcc/fortran/parse.c:2675 #7 0x8005fa86 in gfc_be_parse_file (set_yydebug=Variable set_yydebug is not available. ) at /build/gcc-4.1/gcc/fortran/f95-lang.c:286 #8 0x802bf740 in toplev_main (argc=dwarf2_read_address: Corrupted DWARF expression. ) at /build/gcc-4.1/gcc/toplev.c:990 #9 0x020951d2 in __libc_start_main () from /lib64/libc.so.6 #10 0x80004b7a in _start () -- Summary: ICE in fold-const.c Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: krebbel at gcc dot gnu dot org GCC build triplet: i486-linux-gnu, s390x-ibm-linux GCC host triplet: i486-linux-gnu, s390x-ibm-linux GCC target triplet: i486-linux-gnu, s390x-ibm-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24887