[Bug middle-end/44300] Spurious array subscript warning, &b[0] == &a[1] is not folded

2010-05-28 Thread segher at kernel dot crashing dot org
--- Comment #11 from segher at kernel dot crashing dot org 2010-05-29 00:34 --- (In reply to comment #5) > Can you recommend an elegant way to rewrite this code to avoid the warning? static inline void foo(int *p) { if ((uintptr_t)p - (uintptr_t)(a + 1) < sizeof a - size

[Bug target/43892] PowerPC suboptimal "add with carry" optimization

2010-05-26 Thread segher at kernel dot crashing dot org
--- Comment #14 from segher at kernel dot crashing dot org 2010-05-26 16:46 --- (In reply to comment #13) > > Please see -mcpu= . > > Almost forgot, but how do I specify that at gcc build/configure ? You can configure with --with-cpu= to set a default for -mcpu= . >

[Bug tree-optimization/42286] October 23rd change to tree-ssa-pre.c breaks calculix on powerpc with -ffast-math

2010-01-05 Thread segher at kernel dot crashing dot org
--- Comment #10 from segher at kernel dot crashing dot org 2010-01-05 16:42 --- (In reply to comment #9) > Right. Just it might be simpler with -fno-signed-zeros to > transform a-b*c to 0 + -(b*c-a). a-b*c is two machine instructions; -(b*c-a) is one. Adding zero again makes

[Bug tree-optimization/42286] October 23rd change to tree-ssa-pre.c breaks calculix on powerpc with -ffast-math

2010-01-05 Thread segher at kernel dot crashing dot org
--- Comment #8 from segher at kernel dot crashing dot org 2010-01-05 16:00 --- (In reply to comment #6) > IIRC the problem is that using fma causes the -0 argument for fsqrt (which > behaves 100% correct). Thus a more sensible fix would be to do the 0+ on > the fma result.

[Bug tree-optimization/42286] October 23rd change to tree-ssa-pre.c breaks calculix on powerpc with -ffast-math

2010-01-05 Thread segher at kernel dot crashing dot org
--- Comment #7 from segher at kernel dot crashing dot org 2010-01-05 15:57 --- With -fno-signed-zeroes, a-b*c is transformed to -(b*c-a), which is a machine instruction. If the result would have been +0 before, it now is -0. The code then takes the sqrt() of that; sqrt(-0) is -0

[Bug debug/41893] New: ICE with -combine and debug

2009-10-31 Thread segher at kernel dot crashing dot org
ent: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41893

[Bug middle-end/41743] New: Missing loop optimisation

2009-10-18 Thread segher at kernel dot crashing dot org
5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.

[Bug middle-end/41742] New: Unnecessary zero-extension at -O2 but not -O1

2009-10-18 Thread segher at kernel dot crashing dot org
erity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41742

[Bug middle-end/41741] New: -Os generates bigger code than -O2 for simple loops

2009-10-18 Thread segher at kernel dot crashing dot org
P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41741

[Bug tree-optimization/39804] [4.5 Regression] internal compiler error: in propagate_necessity, at tree-ssa-dce.c:754

2009-04-19 Thread segher at kernel dot crashing dot org
--- Comment #8 from segher at kernel dot crashing dot org 2009-04-19 19:39 --- > Added: > branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr39804.c Hi hjl, Why backport a single testcase from trunk to 4.4? This bug never existed on 4.4, it's not terribly useful

[Bug tree-optimization/39804] internal compiler error: in propagate_necessity, at tree-ssa-dce.c:754

2009-04-18 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2009-04-18 09:53 --- Created an attachment (id=17653) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17653&action=view) testcase, not minimised -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39804

[Bug tree-optimization/39804] New: internal compiler error: in propagate_necessity, at tree-ssa-dce.c:754

2009-04-18 Thread segher at kernel dot crashing dot org
nu dot org ReportedBy: segher at kernel dot crashing dot org GCC host triplet: x86_64-linux GCC target triplet: i386-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39804

[Bug target/39768] internal compiler error: RTL check: expected code 'const_int', have 'reg' in gen_rotlsi3, at config/bfin/bfin.md:1616

2009-04-14 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2009-04-14 16:15 --- Created an attachment (id=17636) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17636&action=view) testcase, not minimised -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39768

[Bug target/39768] New: internal compiler error: RTL check: expected code 'const_int', have 'reg' in gen_rotlsi3, at config/bfin/bfin.md:1616

2009-04-14 Thread segher at kernel dot crashing dot org
Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC host triplet: x86_64-linux GCC

[Bug bootstrap/39767] New: libgcc2.c:562: internal compiler error: RTL check: expected code 'reg', have 'ashiftrt' in rhs_regno, at rtl.h:1005

2009-04-14 Thread segher at kernel dot crashing dot org
', have 'ashiftrt' in rhs_regno, at rtl.h:1005 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org

[Bug debug/39766] internal compiler error: in compute_frame_pointer_to_fb_displacement, at dwarf2out.c:12179

2009-04-14 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2009-04-14 15:50 --- Created an attachment (id=17635) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17635&action=view) testcase, not minimised -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39766

[Bug debug/39766] New: internal compiler error: in compute_frame_pointer_to_fb_displacement, at dwarf2out.c:12179

2009-04-14 Thread segher at kernel dot crashing dot org
Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC host triplet: x86_64-linux GCC target triplet: h8300-

[Bug middle-end/39765] internal compiler error: in copyprop_hardreg_forward_1

2009-04-14 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2009-04-14 15:30 --- Created an attachment (id=17634) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17634&action=view) testcase, not minimised -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39765

[Bug middle-end/39765] New: internal compiler error: in copyprop_hardreg_forward_1

2009-04-14 Thread segher at kernel dot crashing dot org
ssigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC host triplet: x86_64-linux GCC target triplet: cris-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39765

[Bug middle-end/35307] Missing Simplication for div op

2008-02-26 Thread segher at kernel dot crashing dot org
--- Comment #3 from segher at kernel dot crashing dot org 2008-02-26 16:16 --- > > Not equivalent in the presence of overflow. > > You mean defined overflow :). No, I mean overflow. Let's assume int is 16-bit (just to keep the numbers smallish); now take i=1, j=100

[Bug middle-end/35307] Missing Simplication for div op

2008-02-23 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2008-02-23 19:57 --- Not equivalent in the presence of overflow. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35307

[Bug middle-end/35306] Missing expression simplication for conditional OR

2008-02-23 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2008-02-23 19:51 --- (In reply to comment #0) > The following rule is not handled by GCC > > (a & x) || (a & y) ===> a & (x | y) Perhaps that is because those two expressions aren't equivalent?

[Bug inline-asm/33600] [4.3 Regression] Breakage caused by the fix to PR33552

2007-09-30 Thread segher at kernel dot crashing dot org
--- Comment #4 from segher at kernel dot crashing dot org 2007-09-30 14:07 --- The original code is: (arch/i386/lib/usercopy.c): /* Generic arbitrary sized copy. */ #define __copy_user(to,from,size) \ do

[Bug inline-asm/33600] Breakage caused by the fix to PR33552

2007-09-30 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2007-09-30 10:39 --- Created an attachment (id=14272) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14272&action=view) reduced testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33600

[Bug inline-asm/33600] New: Breakage caused by the fix to PR33552

2007-09-30 Thread segher at kernel dot crashing dot org
ent: inline-asm AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org GCC target triplet: i386-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33600

[Bug target/33360] cris build failure

2007-09-08 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2007-09-08 23:06 --- SVN revision 128276 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33360

[Bug target/33360] New: cris build failure

2007-09-08 Thread segher at kernel dot crashing dot org
ReportedBy: segher at kernel dot crashing dot org GCC build triplet: x86_64-linux GCC host triplet: x86_64-linux GCC target triplet: cris-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33360

[Bug c/33102] volatile excessively suppresses optimizations in range checks

2007-08-17 Thread segher at kernel dot crashing dot org
--- Comment #5 from segher at kernel dot crashing dot org 2007-08-18 00:31 --- > It is still the same issue. > > *** This bug has been marked as a duplicate of 3506 *** It isn't the same issue. The submitter of #3506 claimed the code that GCC currently generates is in

[Bug c/33102] volatile excessively suppresses optimizations in range checks

2007-08-17 Thread segher at kernel dot crashing dot org
--- Comment #3 from segher at kernel dot crashing dot org 2007-08-18 00:12 --- (In reply to comment #1) > volatile != atomic. And that is relevant why? Paul is perfectly aware of this, btw. There might be other reasons why GCC doesn't want to do this optimisation, but this i

[Bug c/33053] New: adopt accesses through a volatile-casted pointer as a GNU C extension

2007-08-12 Thread segher at kernel dot crashing dot org
edBy: segher at kernel dot crashing dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33053

[Bug middle-end/31490] Compile error section type conflict

2007-05-18 Thread segher at kernel dot crashing dot org
--- Comment #10 from segher at kernel dot crashing dot org 2007-05-18 14:57 --- Created an attachment (id=13578) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13578&action=view) proposed patch still need to run the testsuite on it -- http://gcc.gnu.org/bugzilla/show_

[Bug middle-end/31490] Compile error section type conflict

2007-05-15 Thread segher at kernel dot crashing dot org
--- Comment #8 from segher at kernel dot crashing dot org 2007-05-15 13:07 --- Bisecting shows that the original bug (powerpc64 Linux build errors out) is caused by r122781. I didn't actually test on 4.2 but the same patch is applied there (as r122782). If the reduced testca

[Bug inline-asm/29808] [4.2 Regression] Error: suffix or operands invalid for `mov' when optimization is enabled

2006-11-12 Thread segher at kernel dot crashing dot org
--- Comment #4 from segher at kernel dot crashing dot org 2006-11-12 14:01 --- > If the code is invalid, the fact that it compiles with -O0 is probably a > bug... No, GCC cannot in general detect whether your asm code is buggy. The assembler however can detect many asm bugs,

[Bug inline-asm/29808] [4.2 Regression] Error: suffix or operands invalid for `mov' when optimization is enabled

2006-11-12 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2006-11-12 11:10 --- Not a bug in GCC but in your code; "g" says immediate values are allowed, while this asm insn only takes registers (or 16-bit memory). -- segher at kernel dot crashing dot org changed:

[Bug c/24010] [4.0/4.1/4.2 Regression] Duplicate C99 dot initializer warning missing

2006-09-03 Thread segher at kernel dot crashing dot org
--- Comment #3 from segher at kernel dot crashing dot org 2006-09-03 20:39 --- The overwriting behaviour is required by 6.7.8/18 and 19. A warning is certainly in order; long ago, GCC used to warn, and bugs were caught because of that. Not anymore... I'll see if I can do a

[Bug rtl-optimization/26549] [3.4/4.0/4.1/4.2 Regression] pointer truncation in arch/powerpc/kernel/prom_init.c

2006-03-03 Thread segher at kernel dot crashing dot org
--- Comment #4 from segher at kernel dot crashing dot org 2006-03-03 18:34 --- Not a bug at all, actually. GCC thinks it can mask out the lower few bits, because GPR1 should always be 16-byte aligned. And it isn't in your prom_init testing, and that's the bug. Better figu

[Bug rtl-optimization/26549] pointer truncation in arch/powerpc/kernel/prom_init.c

2006-03-03 Thread segher at kernel dot crashing dot org
--- Comment #1 from segher at kernel dot crashing dot org 2006-03-03 16:58 --- Confirmed, bug is in combine... looking into it... -- segher at kernel dot crashing dot org changed: What|Removed |Added

[Bug preprocessor/23779] '-C' option produces wrong output

2005-10-26 Thread segher at kernel dot crashing dot org
--- Comment #3 from segher at kernel dot crashing dot org 2005-10-26 11:44 --- The (first) carriage return issue is a separate bug, though. Please reopen? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23779

[Bug preprocessor/24024] [3.4/4.0/4.1 Regression] gcc -E -C processes "\" incorrectly inside C comments

2005-09-27 Thread segher at kernel dot crashing dot org
--- Additional Comments From segher at kernel dot crashing dot org 2005-09-27 16:19 --- Looks like the issue is that lex.c:save_comment() doesn't look at line_note's. An analogous issue happens with trigraphs. Btw, the C standard _does_ require escaped newlines and trigr

[Bug preprocessor/21250] [4.1 Regression] line number 0 for causes GAS to complain

2005-04-28 Thread segher at kernel dot crashing dot org
--- Additional Comments From segher at kernel dot crashing dot org 2005-04-28 15:08 --- The C standard has this to say about line numbers, in 6.10.4/2: The line number of the current source line is one greater than the number of new-line characters read or introduced in translation

[Bug preprocessor/21250] New: line number 0 for causes GAS to complain

2005-04-27 Thread segher at kernel dot crashing dot org
ity: P2 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: segher at kernel dot crashing dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-linux GCC host triplet: powerpc-linux GCC target triplet: power

[Bug target/20781] 64 bit shift by non-constant implemented as libcall on PPC32

2005-04-07 Thread segher at kernel dot crashing dot org
--- Additional Comments From segher at kernel dot crashing dot org 2005-04-07 23:34 --- Subject: Re: New: 64 bit shift by non-constant implemented as libcall on PPC32 > (O5 will give slightly better code for both, but let's start somewhere > :P) Well the code for the lef

[Bug c/20709] strict aliasing warning with float pointer pointing to int pointer

2005-04-05 Thread segher at kernel dot crashing dot org
--- Additional Comments From segher at kernel dot crashing dot org 2005-04-05 23:32 --- Subject: Re: strict aliasing warning with float pointer pointing to int pointer > Aka this is valid and defined (even though we warn): > float a(float b) > { > int i; >

[Bug other/19082] [4.0 Regression] build/genattrtab: out of memory allocating 151568 bytes after a total of 4161651196 bytes

2004-12-20 Thread segher at kernel dot crashing dot org
-- What|Removed |Added CC||segher at kernel dot ||crashing dot org http://gcc.gnu.org

[Bug rtl-optimization/19055] Minor bit optimization with or and xor

2004-12-17 Thread segher at kernel dot crashing dot org
-- What|Removed |Added CC||segher at kernel dot ||crashing dot org http://gcc.gnu.org