[Bug target/42496] New: wrong if conversion optimization

2009-12-25 Thread carrot at google dot com
Compile the attached test case with options -Os, I can get the ideal result: foo: cmp r0, #0 ldr r3, .L5 movne r2, #10 moveq r2, #20 str r2, [r3, #0] bx lr But when I changed the options to -O2, I got: foo: cmp r0,

[Bug target/42496] wrong if conversion optimization

2009-12-25 Thread carrot at google dot com
--- Comment #1 from carrot at google dot com 2009-12-25 08:14 --- Created an attachment (id=19389) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19389action=view) test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42496

[Bug target/42497] New: GCC can do less work in the frequently executed path

2009-12-25 Thread carrot at google dot com
Compile following code with options -march=armv5te -O2 extern void *memcpy(void *dst, const void *src, int n); void *memmove(void *dst, const void *src, int n) { const char *p = src; char *q = dst; if (__builtin_expect(q p, 1)) { return memcpy(dst, src, n); } else {

[Bug target/42498] New: GCC can't use smull to compute int * int -- long long

2009-12-25 Thread carrot at google dot com
Compile following code with options -O2 extern C void foo(long long a, long long b, long long c); extern C void bar(int a, int b, int c, int d) { long long x = (long long)a*b; long long y = (long long)b*c; long long z = (long long)c*d; foo(x,y,z); } gcc generates: bar:

[Bug rtl-optimization/42489] Opt bug -foptimize-sibling-calls function call stalled! dead-lock, cpu max

2009-12-25 Thread t66667 at gmail dot com
--- Comment #9 from t7 at gmail dot com 2009-12-25 09:18 --- Most unfortunate the gcc-4.* built with crt and win32api from http://sf.net/projects/mingw do not suffer from this bug. Therefore specific to target i686/x86_64-w64-mingw32 http://sourceforge.net/projects/mingw-w64 only.

[Bug c++/42470] Conversion Constructor not accepted/recognized

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-12-25 09:47 --- This is not the proper place for academic discussions, definitely. If you are not convinced, try Comeau, or SunStudio, or ICC in strict mode. -- paolo dot carlini at oracle dot com changed:

[Bug c++/42472] class members not getting assigned access thru another method

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-12-25 09:50 --- Yes, in C++03 (C++0x will be different), a constructor cannot call *another constructor*. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42472

[Bug c++/38392] Template friend function injection

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #16 from paolo dot carlini at oracle dot com 2009-12-25 09:53 --- As Jason confirmed, this is not a regression, thus, post 4.5.0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug rtl-optimization/42499] New: Bad register allocation in multiplication code by constant

2009-12-25 Thread sliao at google dot com
It seems that GCC 4.2.1 generates better code than GCC 4.4.0 in this case: The following code (extracted from Android's Dalvik_java_lang_System_currentTimeMillis in native/java_lang_System.c): // compilation options: -march=armv5te -mthumb -Os struct timeval { long tv_sec; long tv_usec; };

[Bug c++/38392] Template friend function injection

2009-12-25 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #17 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-25 10:42 --- Ok I managed to compile GCC 4.5, applied the patch and compiled the test code above and everything works fine. Thanks again! And yes, I imagined it would have been post 4.5 but I meant 'when' from a time frame

[Bug rtl-optimization/42389] ICE in advance_state_on_fence with sel-schd for 175.vpr

2009-12-25 Thread abel at gcc dot gnu dot org
--- Comment #2 from abel at gcc dot gnu dot org 2009-12-25 10:44 --- Confirmed. This needs my uncommitted patch from http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01931.html (which is correctly saving and restoring can_issue_more variable in the presence of multiple scheduling points)

[Bug c++/38392] Template friend function injection

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #18 from paolo dot carlini at oracle dot com 2009-12-25 10:48 --- If I were you, I would not use this kind of C++ at all, for the time being. As we discussed already, it's *very* weakly supported and your software would not be portable. --

[Bug c++/38392] Template friend function injection

2009-12-25 Thread H9XLrv5oXVNvHiUI at spambox dot us
--- Comment #19 from H9XLrv5oXVNvHiUI at spambox dot us 2009-12-25 11:02 --- Yeah I know, but consider that I used this code only in a specific circumstance and does not constitute a core part of my application (or a foundation of some higher level mechanism). And I know it's a lot

[Bug c++/38392] Template friend function injection

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #20 from paolo dot carlini at oracle dot com 2009-12-25 11:06 --- Then wait, good luck -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392

[Bug target/42500] New: unnecessary register move

2009-12-25 Thread carrot at google dot com
Compile the following code with options -O2 extern C void foo(int a[4]); extern C void bar(int a, int b, int c, int d) { int v[4] = {a,b,c,d}; foo(v); foo(v); } GCC generates bar: stmfd sp!, {r4, lr} .save {r4, lr} .LCFI0: .pad #16 sub sp,

[Bug middle-end/42501] New: Code bloating on operations with bit fields

2009-12-25 Thread sliao at google dot com
Alexvod tried pr31849-patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31849. It changed result size from 72 to 68 below, but still didn't eliminated the loop counter below. See the following code // compilation options: -march=armv5te -mthumb -Os struct tree_block { unsigned

[Bug rtl-optimization/42502] New: Bad register allocation in a very simple code

2009-12-25 Thread sliao at google dot com
The following code // compilation options: -march=armv5te -mthumb -Os struct node { long long a; long long b; }; void func (struct node *n); long long test (int from, int to) { struct node n; func(n); if (from == 1) return n.a; else { if (to == 2) return n.b; else

[Bug rtl-optimization/42489] Opt bug -foptimize-sibling-calls function call stalled! dead-lock, cpu max

2009-12-25 Thread d dot g dot gorbachev at gmail dot com
--- Comment #10 from d dot g dot gorbachev at gmail dot com 2009-12-25 13:34 --- No simple test-case code can be provided you have to read libxml2 source error.c about less then 1000 lines. Could you please provide the preprocessed source file, as described here:

[Bug target/42503] New: gcc-4.4-20091215 broke libjava on ARM

2009-12-25 Thread mikpe at it dot uu dot se
Building gcc-4.4-20091215 on arm with java enabled fails with a linkage error: libtool: link: ( cd .libs rm -f libgcj_bc.la ln -s ../libgcj_bc.la libgcj_bc.la ) /bin/sh ./libtool --tag=GCJ --mode=link /home/mikpe/objdir44/gcc/gcj -B/home/mikpe/objdir44/armv5tel-brewer-linux-gnueabi/libjava/

[Bug c/42504] New: error: bit-field 'anonymous' width not an integer constant

2009-12-25 Thread denis dot onischenko at gmail dot com
Error occurs when compiling latest linux kernel with 155464 gcc 4.5.0 revision -- Summary: error: bit-field 'anonymous' width not an integer constant Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal

[Bug c/42504] error: bit-field 'anonymous' width not an integer constant

2009-12-25 Thread denis dot onischenko at gmail dot com
--- Comment #1 from denis dot onischenko at gmail dot com 2009-12-25 14:52 --- Created an attachment (id=19390) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19390action=view) preprocessed source file -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42504

[Bug c/42504] error: bit-field 'anonymous' width not an integer constant

2009-12-25 Thread denis dot onischenko at gmail dot com
--- Comment #2 from denis dot onischenko at gmail dot com 2009-12-25 14:52 --- Created an attachment (id=19391) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19391action=view) compiler output -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42504

[Bug c/42439] Linux kernel BUILD_BUG_ON() broke

2009-12-25 Thread hjl dot tools at gmail dot com
--- Comment #4 from hjl dot tools at gmail dot com 2009-12-25 17:15 --- *** Bug 42504 has been marked as a duplicate of this bug. *** -- hjl dot tools at gmail dot com changed: What|Removed |Added

[Bug c/42504] error: bit-field 'anonymous' width not an integer constant

2009-12-25 Thread hjl dot tools at gmail dot com
--- Comment #3 from hjl dot tools at gmail dot com 2009-12-25 17:15 --- *** This bug has been marked as a duplicate of 42439 *** -- hjl dot tools at gmail dot com changed: What|Removed |Added

[Bug lto/42451] 'warning: type of array does not match original declaration' with -flto/-fwhopr

2009-12-25 Thread zsojka at seznam dot cz
--- Comment #4 from zsojka at seznam dot cz 2009-12-25 18:42 --- Created an attachment (id=19392) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19392action=view) testcase reproducing the crash (with checking enabled) I wasn't able to reduce number of input files, so they are

[Bug middle-end/42505] New: loop canonicalization causes a lot of unnecessary temporary variables

2009-12-25 Thread sliao at google dot com
This regression was caused by loop canonicalization. The following example: struct A { int f1; int f2; }; int func(int c); int test(struct A* src, struct A* dst, int count) { while (count--) { if (!func(src-f2)) { return 0; } *dst++ = *src++; } return 1; } gcc

[Bug fortran/42484] ICE with -fopenmp

2009-12-25 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2009-12-25 20:36 --- Sorry. Of course the code is *not* valid. Section 1.2.2 of the OpenMP 3.0 specification says: The point of exit cannot be a branch out of the structured block. Also, an analogous example in C is correctly rejected:

[Bug c++/42470] Conversion Constructor not accepted/recognized

2009-12-25 Thread Curatica at gmail dot com
--- Comment #4 from Curatica at gmail dot com 2009-12-25 21:11 --- Whatever... -- Curatica at gmail dot com changed: What|Removed |Added Status|RESOLVED

[Bug c++/42470] Conversion Constructor not accepted/recognized

2009-12-25 Thread Curatica at gmail dot com
--- Comment #5 from Curatica at gmail dot com 2009-12-25 21:12 --- Whatever... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42470

[Bug c++/35421] ICE on Valid Code

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #8 from paolo dot carlini at oracle dot com 2009-12-25 22:11 --- Feedback not forthcoming. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug c++/40055] Failing instantiation of template with enums

2009-12-25 Thread paolo dot carlini at oracle dot com
-- paolo dot carlini at oracle dot com changed: What|Removed |Added Severity|critical|normal Known to fail||4.4.2

[Bug c++/40055] Failing instantiation of template with enums

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-12-25 22:17 --- Works in mainline, not a regression, thus closing as fixed. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug c++/40365] g++ template expansion bug

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #6 from paolo dot carlini at oracle dot com 2009-12-25 22:21 --- Feedback not forthcoming. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug c++/40484] internal compiler error

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-12-25 22:23 --- Feedback not forthcoming. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug c++/41060] Wconversion Ignores static_cast

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2009-12-25 22:25 --- Feedback not forthcoming. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug c++/40694] ICE while building clang

2009-12-25 Thread paolo dot carlini at oracle dot com
--- Comment #4 from paolo dot carlini at oracle dot com 2009-12-25 22:26 --- Looks like can be closed. -- paolo dot carlini at oracle dot com changed: What|Removed |Added