[Bug c++/43285] New: typeof doesn't act like a type in "::"

2010-03-07 Thread igodard at pacbell dot net
This code: struct foo { typedef int f; }; int main() { foo g; typeof(g)::f bar; typedef typeof(g) h; h::f baz; return 0; } gets: s3:~/ootbc/personal/ivan$ g++ foo.cc foo.cc: In function ‘int main()’: foo.cc:4: error: expected initializer before ‘bar’ -- Su

[Bug target/39223] volatile bug on AVR

2010-03-07 Thread anitha dot boyapati at atmel dot com
--- Comment #9 from anitha dot boyapati at atmel dot com 2010-03-08 06:04 --- (In reply to comment #5) > Fails with gcc 4.4.3 and gcc 4.5 with -O1. > Correction : The bug passes with 4.4.2 and above versions. Code generated can be seen below. func_45: ... rcall func_1

[Bug target/39223] volatile bug on AVR

2010-03-07 Thread abnikant at gmail dot com
--- Comment #8 from abnikant at gmail dot com 2010-03-08 05:26 --- avr-gcc-4.4.0 -S -O1 small.c code snippet version avr-gcc-4.4.0 .L__stack_usage = 0 rcall func_15 sbiw r24,0 breq .L4 lds r24,g_54 lds r25,g_54+1 lds r26,g_54+2 lds r27,g_54+3 .L4: sts g_8

[Bug target/39223] volatile bug on AVR

2010-03-07 Thread abnikant at gmail dot com
--- Comment #7 from abnikant at gmail dot com 2010-03-08 05:22 --- (In reply to comment #6) > An observation - the same file when compiled with -O1 for i386 target also > appears to load g_54 using movl instruction. > > _func_45: > ... > L11: > testw %bx, %bx >

[Bug c++/43281] [c++0x] ICE with invalid auto

2010-03-07 Thread jason at gcc dot gnu dot org
--- Comment #2 from jason at gcc dot gnu dot org 2010-03-08 04:27 --- and indeed this testcase gets the same crash: void f() { auto val = val; } -- jason at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-07 Thread bangerth at gmail dot com
--- Comment #5 from bangerth at gmail dot com 2010-03-08 04:26 --- What I'm saying is that this entire discussion is already present in PR13687 and that there is nothing more to say. The warning exists in C because it can lead to hard-to-find bugs in C code because you can call a functio

[Bug c++/13687] -Wmissing-prototypes should not be ignored for C++

2010-03-07 Thread bangerth at gmail dot com
--- Comment #19 from bangerth at gmail dot com 2010-03-08 04:26 --- *** Bug 43272 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13687

[Bug c++/43272] -Wmissing-prototypes doesn't work in C++ mode

2010-03-07 Thread erh+gcc at nimenees dot com
--- Comment #4 from erh+gcc at nimenees dot com 2010-03-08 04:02 --- (In reply to comment #3) > (In reply to comment #2) > > So does this mean bug #13687 is going to be reopened? Or is there some > > workaround that hasn't been mentioned? > > No. I think the issue has been discussed at

[Bug fortran/42950] gfortran testsuite failures on mingw64

2010-03-07 Thread jvdelisle at gcc dot gnu dot org
--- Comment #9 from jvdelisle at gcc dot gnu dot org 2010-03-08 02:53 --- Kai, Patch in Comment #8 is OK to commit. Thanks! (I also regression tested on x86-64-linux-gnu.) -- jvdelisle at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/43281] [c++0x] ICE in nested lambda functions with invalid auto

2010-03-07 Thread jason at gcc dot gnu dot org
--- Comment #1 from jason at gcc dot gnu dot org 2010-03-08 02:37 --- The code is ill-formed; specifically, the line auto val = val; violates 7.1.6.4/3: "The name of the object being declared shall not appear in the initializer expression." -- jason at gcc dot gnu dot org changed:

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread pinskia at gcc dot gnu dot org
--- Comment #6 from pinskia at gcc dot gnu dot org 2010-03-08 01:06 --- Dup of bug 15272. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43282

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread bangerth at gmail dot com
--- Comment #5 from bangerth at gmail dot com 2010-03-08 00:36 --- OK, so the question is whether the testcase in comment #3 should be rejected based on the wording of 14.6.2/3. Jason, as our resident language lawyer, would you mind commenting? W. -- bangerth at gmail dot com chan

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread schaub-johannes at web dot de
--- Comment #4 from schaub-johannes at web dot de 2010-03-08 00:26 --- Yes, this is the consequence. You have to add "this->" or "Bar::" to use another form of lookup (qualified or class-member access) or use a using-declaration to bring the name in scope ("using HasFoo::foo;"). I can'

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread bangerth at gmail dot com
--- Comment #3 from bangerth at gmail dot com 2010-03-08 00:19 --- But that would mean that the following code should be invalid because the compiler should never find HasFoo::foo even at instantiation time: - template struct HasFoo { void foo(T) { } }; template st

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread schaub-johannes at web dot de
--- Comment #2 from schaub-johannes at web dot de 2010-03-08 00:01 --- The point is that the scope of the base class is not examined even during instantiation, so you cannot find the class member function and ADL finds A::foo instead. The Standard says at 14.6.2/3: In the definition of

[Bug c++/43282] GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread bangerth at gmail dot com
--- Comment #1 from bangerth at gmail dot com 2010-03-07 23:41 --- The error message I get is this: g/x> c++ -c x.cc x.cc: In member function 'void Bar::bar() [with T = A::Baz]': x.cc:18: instantiated from here x.cc:10: error: no matching function for call to 'Bar::foo(A::Baz)' x.cc:3

[Bug c++/43284] Explicit casting of double to long long causes value to overflow

2010-03-07 Thread ullner at gmail dot com
--- Comment #2 from ullner at gmail dot com 2010-03-07 22:10 --- Hm? How does calling std::pow with different types behave differently? The value can be stored fine if one does "double dValue = std::pow(2.0, 64);long long llValue = dValue;" // OK -- http://gcc.gnu.org/bugzilla/show_

[Bug c++/43284] Explicit casting of double to long long causes value to overflow

2010-03-07 Thread schwab at linux-m68k dot org
--- Comment #1 from schwab at linux-m68k dot org 2010-03-07 22:07 --- 9223372036854775807 has more significant bits than what fits in a double, it is rounded to 9223372036854775808.0, which then overflows when converted to long long. -- schwab at linux-m68k dot org changed:

[Bug middle-end/42718] FAIL: gcc.c-torture/compile/pr42559.c at -O1 and above

2010-03-07 Thread danglin at gcc dot gnu dot org
--- Comment #2 from danglin at gcc dot gnu dot org 2010-03-07 21:44 --- Breakpoint 1, get_object_alignment (exp=0x7afb80f0, align=8, max_align=64) at ../../gcc/gcc/builtins.c:320 320 if (TREE_CODE (exp) == CONST_DECL) (gdb) p debug_tree (exp) > side-effects VOID file /mnt/

[Bug c++/43284] New: Explicit casting of double to long long causes value to overflow

2010-03-07 Thread ullner at gmail dot com
When casting a double to a long long causes GCC to overflow the output value. Imagine; #include double foo() { return 9223372036854775807.0; } int main() { std::wcout << (long long)foo(); // Prints -9223372036854775808 } Additionally, std::pow(double, int) and std::pow(double, double) seem to b

[Bug middle-end/42068] [4.5 regression] ICE in function_and_variable_visibility with static common vars.

2010-03-07 Thread hubicka at gcc dot gnu dot org
--- Comment #34 from hubicka at gcc dot gnu dot org 2010-03-07 20:49 --- Hi, since this is blocker for a release and I can't reproduce the problem myself, if there any hope to get a backtrace? We can also just silence the sanity check for 4.5 for time being, but the proposed patch shoul

[Bug tree-optimization/40436] [4.5 regression] 0.5% code size regression caused by r147852

2010-03-07 Thread hubicka at gcc dot gnu dot org
--- Comment #15 from hubicka at gcc dot gnu dot org 2010-03-07 20:37 --- I've been discussing this on IRC a while ago with Richard Guenther, but forgot to add a record. It seems that for 4.5, it is best to leave inlining heruistics as it is. THe code size regression come mainly from b

[Bug middle-end/42718] FAIL: gcc.c-torture/compile/pr42559.c at -O1 and above

2010-03-07 Thread danglin at gcc dot gnu dot org
--- Comment #1 from danglin at gcc dot gnu dot org 2010-03-07 20:13 --- Unfortunately, we still get the following after back porting the above change: Executing on host: /mnt/gnu/gcc/objdir/gcc/xgcc -B/mnt/gnu/gcc/objdir/gcc/ -O1 -w -c -o pr42559.o /mnt/gnu/gcc/gcc/gcc/testsuite/gcc

[Bug middle-end/39690] ld: An unknown relocation type 8

2010-03-07 Thread danglin at gcc dot gnu dot org
--- Comment #1 from danglin at gcc dot gnu dot org 2010-03-07 19:52 --- I think -freorder-blocks-and-partition should be suppressed on hppa due to the way branches are handled. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39690

[Bug lto/43283] New: ld: Unsatisfied symbol "start" in file c_lto_20091216-1_0.o

2010-03-07 Thread danglin at gcc dot gnu dot org
PASS: gcc.dg/lto/20091027-1 c_lto_20091027-1_0.o-c_lto_20091027-1_1.o link Executing on host: /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/ -O 0 -fwhopr -c -o c_lto_20091216-1_0.o /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/lt o/20091216-1_0.c(timeout = 300) PASS: gcc.dg/lto/20091216-

[Bug c++/43282] New: GCC looks into dependent bases during unqualified lookup

2010-03-07 Thread schaub-johannes at web dot de
GCC does not accept this code, but is supposed to. "foo" is looked up using unqualified name lookup, during which dependent base classes are ignored. The fact that "foo" is dependent must not influence this. template struct HasFoo { void foo() { } }; // dependent "HasFoo" should be ignored duri

[Bug testsuite/41671] Unsatisfied symbol "__sync_fetch_and_add_4"

2010-03-07 Thread danglin at gcc dot gnu dot org
--- Comment #1 from danglin at gcc dot gnu dot org 2010-03-07 18:58 --- How should this test be xfailed? The lto test options don't seem to provide an xfail mechanism. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41671

[Bug libstdc++/42679] RTLD_DEEPBIND dlopen option for shared library that uses libstdc++ std::ostream crashes

2010-03-07 Thread mjtruog at fastmail dot ca
--- Comment #17 from mjtruog at fastmail dot ca 2010-03-07 17:53 --- I have found this doesn't fix the problem. It may fix the problem in the example, but not in all cases. I have a few new crash dumps: Core was generated by `_release/lib/cloud-0.0.9/priv/cloud_worker_port'. Program t

[Bug tree-optimization/42341] ICE in insert_value_copy_on_edge, at tree-outof-ssa.c:228

2010-03-07 Thread danglin at gcc dot gnu dot org
--- Comment #4 from danglin at gcc dot gnu dot org 2010-03-07 17:52 --- gcc.dg/lto/20090116 fails on hppa64-hp-hpux11.11 as shown in #1. -- danglin at gcc dot gnu dot org changed: What|Removed |Added

[Bug c/43009] segmentation fault with -O3 when accessing byte-aligned array as dwords

2010-03-07 Thread rguenth at gcc dot gnu dot org
--- Comment #11 from rguenth at gcc dot gnu dot org 2010-03-07 17:36 --- (In reply to comment #10) > Cannot we warn for this? As usual, if we knew the data is not aligned we'd not "miscompile" it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43009

[Bug fortran/40850] double free in nested types with allocatable components

2010-03-07 Thread dominiq at lps dot ens dot fr
--- Comment #9 from dominiq at lps dot ens dot fr 2010-03-07 17:24 --- I just noticed that using -Warray-temporaries gives the warning twice. For the test in comment #8, I get [macbook] f90/bug% gfc -Warray-temporaries -fcheck=all pr40850_3.f90 pr40850_3.f90:11.13: CALL test ((/ line

[Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!

2010-03-07 Thread hjl dot tools at gmail dot com
--- Comment #4 from hjl dot tools at gmail dot com 2010-03-07 16:56 --- It is caused by revision 148848: http://gcc.gnu.org/ml/gcc-cvs/2009-06/msg00831.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280

[Bug c/43009] segmentation fault with -O3 when accessing byte-aligned array as dwords

2010-03-07 Thread manu at gcc dot gnu dot org
--- Comment #10 from manu at gcc dot gnu dot org 2010-03-07 16:17 --- Cannot we warn for this? -- manu at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-07 Thread dominiq at lps dot ens dot fr
--- Comment #9 from dominiq at lps dot ens dot fr 2010-03-07 15:59 --- For the record, the patch in comment #8 does not apply on fortran-dev. AFAICT the patches in comments #2 and 7 are enough for the branch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43256

[Bug tree-optimization/43280] [4.5 Regression] gcc4.5 -m32 -O2: misoptimizes sha256!

2010-03-07 Thread rguenth at gcc dot gnu dot org
--- Comment #3 from rguenth at gcc dot gnu dot org 2010-03-07 15:47 --- Confirmed. This is exposed by the new bswap pass. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added --

[Bug debug/43176] var-tracking fails to notice a value change

2010-03-07 Thread jakub at gcc dot gnu dot org
--- Comment #8 from jakub at gcc dot gnu dot org 2010-03-07 15:44 --- Subject: Bug 43176 Author: jakub Date: Sun Mar 7 15:44:11 2010 New Revision: 157264 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157264 Log: PR debug/43176 * Makefile.in (var-tracking.o): De

[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers

2010-03-07 Thread rguenth at gcc dot gnu dot org
--- Comment #48 from rguenth at gcc dot gnu dot org 2010-03-07 15:35 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFI

[Bug middle-end/42220] [4.5 Regression] FAIL: gfortran.dg/complex_intrinsic_5.f90 -m64 -O -frename-registers

2010-03-07 Thread bernds at gcc dot gnu dot org
--- Comment #47 from bernds at gcc dot gnu dot org 2010-03-07 15:20 --- Subject: Bug 42220 Author: bernds Date: Sun Mar 7 15:20:12 2010 New Revision: 157263 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157263 Log: PR rtl-optimization/42220 * regrename.c (scan_

[Bug tree-optimization/42326] [4.5 Regression][graphite] segfault in tree-data-ref.c with Graphite building 200.sixtrack

2010-03-07 Thread hjl dot tools at gmail dot com
--- Comment #18 from hjl dot tools at gmail dot com 2010-03-07 14:43 --- Confirmed. This patch: Fix PR42326: handle default definitions. 2010-03-02 Sebastian Pop PR middle-end/42326 * sese.c (name_defined_in_loop_p): Return false for default definitions.

[Bug tree-optimization/42326] [4.5 Regression][graphite] segfault in tree-data-ref.c with Graphite building 200.sixtrack

2010-03-07 Thread p dot vanhoof at oma dot be
--- Comment #17 from p dot vanhoof at oma dot be 2010-03-07 14:12 --- The test case in comment #9 has only been fixed on the graphite branch, but still crashes on the trunk as of r157255. Please reopen and fix this problem on the trunk. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id

[Bug fortran/43256] [OOP] TBP with missing optional arg

2010-03-07 Thread janus at gcc dot gnu dot org
--- Comment #8 from janus at gcc dot gnu dot org 2010-03-07 14:07 --- (In reply to comment #7) > This leaves us with the following regressions: > > FAIL: gfortran.dg/dynamic_dispatch_1.f03 -O0 (test for excess errors) > FAIL: gfortran.dg/dynamic_dispatch_3.f03 -O0 (test for excess e

[Bug libgcj/43279] Constructor java.lang.String(int[], int, int) missing

2010-03-07 Thread mark at gcc dot gnu dot org
--- Comment #2 from mark at gcc dot gnu dot org 2010-03-07 13:48 --- GNU Classpath java.lang.String does have the String(int[] codePoints, int offset, int count) constructor. But libgcj still has a separate String implementation that doesn't have this constructor merged. -- mark at g

[Bug c++/43281] New: [c++0x] ICE in nested lambda functions, in a special case

2010-03-07 Thread adam dot rak at streamnovation dot com
it resembles Bug 41896 but with the addition of line: auto val = val; The code is legal but doesn't make any sense. In some rare cases which I couldn't replicate simply, it went into an infinite mallo, consuming the whole memory, instead of segfault. float nested_lambda() { float val;

[Bug libgcj/43279] Constructor java.lang.String(int[], int, int) missing

2010-03-07 Thread marcus at mc dot pp dot se
--- Comment #1 from marcus at mc dot pp dot se 2010-03-07 12:39 --- Here is a reproduction recipe using Jython 2.5.1, by the way: chiyo:~/jython2.5.1% gij-4.4 -jar jython.jar Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) [GNU libgcj (Free Software Foundation, Inc.)] on java1

[Bug tree-optimization/43280] gcc4.5 -m32 -O2: misoptimizes sha256!

2010-03-07 Thread edwintorok at gmail dot com
--- Comment #2 from edwintorok at gmail dot com 2010-03-07 12:19 --- Created an attachment (id=20039) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20039&action=view) preprocessed sha256.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280

[Bug tree-optimization/43280] gcc4.5 -m32 -O2: misoptimizes sha256!

2010-03-07 Thread edwintorok at gmail dot com
--- Comment #1 from edwintorok at gmail dot com 2010-03-07 12:19 --- Created an attachment (id=20038) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20038&action=view) sha256.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43280

[Bug tree-optimization/43280] New: gcc4.5 -m32 -O2: misoptimizes sha256!

2010-03-07 Thread edwintorok at gmail dot com
gcc version 4.5.0 20100307 (experimental) (GCC) Bug initially reported against openSUSE 11.3 factory's gcc-4.5, but I reproduced with upstream gcc-4.5 SVN r157262. See https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1862 for the original report. -- Summary: gcc4.5 -m3

[Bug libgcj/43279] New: Constructor java.lang.String(int[], int, int) missing

2010-03-07 Thread marcus at mc dot pp dot se
In the java.lang.String implementation in libjava, there is no constructor java.lang.String(int[], int, int). This constructor was added by Sun in 1.5, but since gij claims to be 1.5 it should be there. The String class in Classpath has the constructor, but it is not used by gij. --