[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-30 08:08 --- The following is ok: static_castA(*this).fun(); //ok Because you are creating a rvalue to hold *this which is then bound to a const lvalue. The following is an error: fun(); //err Because func

[Bug c++/30332] New: bit-field: optimization BUG?

2006-12-30 Thread s__nakayama at infoseek dot jp
The output is different by the optimization. testcase: #include stdio.h struct S { unsigned int long long a:33; }; int main () { struct S x = { -1 }; typeof(+x.a) z = x.a+10; printf(%llx\n, z); return 0; } result: $ g++ bug.cpp; ./a 20009 $ g++ -O bug.cpp; ./a 9 gcc version:

[Bug c++/30332] bit-field: optimization BUG?

2006-12-30 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-30 08:28 --- So we do x.a+10 in unsigned long long and then cast it to the bit-field type. I am thinking we are getting the wrong type for the typeof anyways. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30332

[Bug c/5351] function pass-by-value structure copy corrupts structure on stack

2006-12-30 Thread van at wdv dot com
--- Comment #5 from van at wdv dot com 2006-12-30 08:33 --- I am running cygwin on Windows XP I am using gcc 3.4.4-3 The bug also manifests itself on my service provider's CPU. All values should be 100.0. Minimal program below. cc -o test test.c My erroneous values: ListA: (x: 100.0

[Bug fortran/30321] program crash for SUM applied to zero-size array

2006-12-30 Thread patchapp at dberlin dot org
--- Comment #4 from patchapp at dberlin dot org 2006-12-30 09:40 --- Subject: Bug number PR libfortran/30321 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01864.html --

[Bug c++/29535] [4.1/4.2/4.3 Regression] ICE in instantiate_class_template, at cp/pt.c:5728

2006-12-30 Thread jakub at gcc dot gnu dot org
--- Comment #7 from jakub at gcc dot gnu dot org 2006-12-30 10:59 --- Testcase #5 ICEs in instantiate_class_template, the following ICEs in tsubst the same as the original unreduced testcase: template class INDEX struct SetRegion2D { struct FloodFillControl { struct

[Bug c/30333] New: Segmentation fault for -O2 on legal code

2006-12-30 Thread dcb314 at hotmail dot com
I just tried to compile Suse package gdm-2.16.1-43 with the GNU C compiler version 4.3 snapshot 20061223. The compiler said if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../../gui -I../../daemon -I../../vicious-extensions -DAUTHDIR=\/var/lib/gdm\ -DDATADIR=\/opt/gnome/share\

[Bug fortran/30321] program crash for SUM applied to zero-size array

2006-12-30 Thread tkoenig at gcc dot gnu dot org
--- Comment #5 from tkoenig at gcc dot gnu dot org 2006-12-30 13:16 --- Subject: Bug 30321 Author: tkoenig Date: Sat Dec 30 13:16:36 2006 New Revision: 120287 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=120287 Log: 2006-12-30 Thomas Koenig [EMAIL PROTECTED] PR

[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com
--- Comment #3 from hongleij at 126 dot com 2006-12-30 13:46 --- the question is : if a const member function can call a non_const member function without const_cast, if fun() changed the member in A,like this: //const_test.cpp struct A { A(unsigned int n) { aa=n; }

[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread pinskia at gcc dot gnu dot org
--- Comment #7 from pinskia at gcc dot gnu dot org 2006-12-30 17:53 --- Invalid as explained by me and Gaby. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30331

[Bug fortran/27900] ICE using intrinsics as arguments

2006-12-30 Thread pault at gcc dot gnu dot org
--- Comment #10 from pault at gcc dot gnu dot org 2006-12-30 18:14 --- Patch just submitted. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/27900] ICE using intrinsics as arguments

2006-12-30 Thread patchapp at dberlin dot org
--- Comment #11 from patchapp at dberlin dot org 2006-12-30 18:15 --- Subject: Bug number PR27900 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01874.html --

[Bug c++/30195] Using declaration doesn't work in template.

2006-12-30 Thread gdr at gcc dot gnu dot org
--- Comment #2 from gdr at gcc dot gnu dot org 2006-12-30 18:42 --- indeed a bug. -- gdr at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/30205] RFE: g++ --unmangle

2006-12-30 Thread gdr at gcc dot gnu dot org
--- Comment #3 from gdr at gcc dot gnu dot org 2006-12-30 18:54 --- As noted by pinskia, this really is a linker option as opposed to front-end option. -- gdr at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/30309] ICE with g++ -fipa-pta and malloc(?)

2006-12-30 Thread gdr at gcc dot gnu dot org
--- Comment #1 from gdr at gcc dot gnu dot org 2006-12-30 19:00 --- I can reproduce this. -- gdr at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/30111] Value-initialization of POD base class doesn't initialize members

2006-12-30 Thread gdr at gcc dot gnu dot org
--- Comment #5 from gdr at gcc dot gnu dot org 2006-12-30 19:40 --- Thsi is indeed a bug in g++. the pod() in inherit() is a value-initialization, not a call to default-constructor. -- gdr at gcc dot gnu dot org changed: What|Removed |Added

[Bug tree-optimization/30334] New: Request for -Wundefined

2006-12-30 Thread gdr at gcc dot gnu dot org
Request for -Wundefined for cases where GCC optimizers can detect undefined behaviour and actively take advantages of them for code generation purpose. -- Summary: Request for -Wundefined Product: gcc Version: 4.3.0 Status: UNCONFIRMED

[Bug tree-optimization/30334] Request for -Wundefined

2006-12-30 Thread gdr at gcc dot gnu dot org
--- Comment #1 from gdr at gcc dot gnu dot org 2006-12-30 19:52 --- working on a patch. -- gdr at gcc dot gnu dot org changed: What|Removed |Added

[Bug preprocessor/21521] -finput-charset -save-temps converts characters twice

2006-12-30 Thread tromey at gcc dot gnu dot org
--- Comment #3 from tromey at gcc dot gnu dot org 2006-12-30 23:11 --- FWIW my initial attempt here, namely inserting %finput-charset* into specs in various places, fails if multiple files are given to gcc when -combine is not used (my patch handles the -combine case). This is because

[Bug pch/30335] New: CreateFileMapping fails in Vista due to lack of admin privileges

2006-12-30 Thread Christoph_vW at reactos dot org
CreateFileMapping fails in Vista due to lack of admin privileges -- Summary: CreateFileMapping fails in Vista due to lack of admin privileges Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: major

[Bug pch/30335] CreateFileMapping fails in Vista due to lack of admin privileges

2006-12-30 Thread Christoph_vW at reactos dot org
--- Comment #1 from Christoph_vW at reactos dot org 2006-12-30 23:46 --- Created an attachment (id=12848) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12848action=view) patch -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30335

[Bug pch/30335] CreateFileMapping fails in Vista due to lack of admin privileges

2006-12-30 Thread Christoph_vW at reactos dot org
--- Comment #2 from Christoph_vW at reactos dot org 2006-12-30 23:49 --- the #include tchar.h should be removed from the patch - it doesn't belong there -- Christoph_vW at reactos dot org changed: What|Removed |Added

[Bug target/30336] New: -mtune=native is wrong when not built with gcc

2006-12-30 Thread hjl at lucon dot org
When gcc isn't built with gcc, we get if (arch) { /* FIXME: i386 is wrong for 64bit compiler. How can we tell if we are generating 64bit or 32bit code? */ cpu = i386; } else cpu = generic; It is suggested to use size of (void *):

[Bug target/30336] -mtune=native is wrong when not built with gcc

2006-12-30 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-31 01:22 --- I always thought cross compilers needed GCC to compile anyways so I don't see why this is a bug? If you mean while bootstrapping and someone uses --with-tune=native, I still don't see why this is an issue as that

[Bug c++/30331] a const member function can call a non_const member function without const_cast

2006-12-30 Thread hongleij at 126 dot com
--- Comment #8 from hongleij at 126 dot com 2006-12-31 02:24 --- (In reply to comment #7) Invalid as explained by me and Gaby. yes,it's my misuse. really sorry for my wrong report. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30331

[Bug fortran/28172] alternate return in contained procedure segfaults

2006-12-30 Thread pault at gcc dot gnu dot org
--- Comment #2 from pault at gcc dot gnu dot org 2006-12-31 06:43 --- This fixes it, regtests and even produces the correct code: Index: gcc/fortran/trans-stmt.c === *** gcc/fortran/trans-stmt.c(revision 120243) ---

[Bug fortran/23060] %VAL, %REF and %DESCR constructs not implemented

2006-12-30 Thread pault at gcc dot gnu dot org
--- Comment #13 from pault at gcc dot gnu dot org 2006-12-31 06:55 --- Subject: Bug 23060 Author: pault Date: Sun Dec 31 06:55:16 2006 New Revision: 120295 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=120295 Log: 2006-12-31 Paul Thomas [EMAIL PROTECTED] PR

[Bug fortran/29389] Statement functions are not recognized as pure when they are

2006-12-30 Thread pault at gcc dot gnu dot org
--- Comment #2 from pault at gcc dot gnu dot org 2006-12-31 07:39 --- This is fixed by: resolve.c:1429 static int pure_function (gfc_expr * e, const char **name) { int pure; /* This is the fix. */ if (e-expr_type == EXPR_FUNCTION e-symtree-n.sym-attr.proc ==

[Bug fortran/27900] ICE using intrinsics as arguments

2006-12-30 Thread pault at gcc dot gnu dot org
--- Comment #12 from pault at gcc dot gnu dot org 2006-12-31 07:51 --- Subject: Bug 27900 Author: pault Date: Sun Dec 31 07:51:47 2006 New Revision: 120296 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=120296 Log: 2006-12-31 Paul Thomas [EMAIL PROTECTED] PR

[Bug fortran/24325] ICE in gfc_get_function_type

2006-12-30 Thread pault at gcc dot gnu dot org
--- Comment #5 from pault at gcc dot gnu dot org 2006-12-31 07:51 --- Subject: Bug 24325 Author: pault Date: Sun Dec 31 07:51:47 2006 New Revision: 120296 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=120296 Log: 2006-12-31 Paul Thomas [EMAIL PROTECTED] PR