[Bug rtl-optimization/43616] [4.5, trunk] Extra register move
--- Comment #1 from ramana at gcc dot gnu dot org 2010-04-07 08:39 --- Confirmed but not yet sure why combine can't merge these 2 insns. I believe it does this in ARM state. -- ramana at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail||4.5.0 4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-04-07 08:39:58 date|| Summary|Extra register move |[4.5, trunk] Extra register ||move http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43616
[Bug target/43671] [4.4/4.5/4.6 Regression] -fsched2-use-superblocks -m32 produces wrong code with vectorization
--- Comment #3 from rguenth at gcc dot gnu dot org 2010-04-07 09:12 --- Confirmed. -- rguenth 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 09:12:13 date|| Target Milestone|--- |4.4.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43671
[Bug c/39034] Decimal floating-point math done wrong
--- Comment #7 from vincent at vinc17 dot org 2010-04-07 09:29 --- This bug is still open, though it appears to be fixed. Is there any reason? -- vincent at vinc17 dot org changed: What|Removed |Added CC||vincent at vinc17 dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39034
[Bug c/39034] Decimal floating-point math done wrong
--- Comment #8 from rguenth at gcc dot gnu dot org 2010-04-07 09:32 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.3.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39034
[Bug c/43673] New: Incorrect warning: use of 'D' length modifier with 'a' type character
With: #define __STDC_WANT_DEC_FP__ #include stdio.h int main (void) { double d = 0.1; _Decimal64 e = 0.1dd; printf (%.20f\n, d); printf (%Da\n, e); printf (%De\n, e); printf (%Df\n, e); printf (%Dg\n, e); return 0; } $ gcc-snapshot -Wall tst.c tst.c: In function 'main': tst.c:9:3: warning: use of 'D' length modifier with 'a' type character while WG14/N1312 says: D Specifies that a following a, A, e, E, f, F, g, or G conversion specifier applies to a _Decimal64 argument. -- Summary: Incorrect warning: use of 'D' length modifier with 'a' type character Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: vincent at vinc17 dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43673
[Bug fortran/43591] PPC: internal compiler error: in gfc_traverse_expr, at fortran/expr.c:3604
--- Comment #13 from burnus at gcc dot gnu dot org 2010-04-07 09:38 --- I somehow miss the setting of expr-value.function.esym and thus expr-value.function.esym-attr for PPC in resolve.c (e.g. in resolve_expr_ppc). Contrary to resolve_compcall, where on has: e-value.function.esym = target-n.sym; (Setting it is not trivial as esym is gfc_symbol while the PPC is a component.) Clearly, e-value.function.esym != NULL as otherwise one would never reach the PURE check in expr.c's external_spec_function but segfault: f = e-value.function.esym; if (!f-attr.pure !f-attr.elemental) In any case, e-value.function.esym-attr does not seem to be correctly set. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43591
[Bug c++/43674] New: Delegating constructors are not supported
The gcc c++0x planning (http://gcc.gnu.org/projects/cxx0x.html) has a patch for 'Delegating constructors'. This feature has no associated gcc release. -- Summary: Delegating constructors are not supported Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tom dot deseyn at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43674
[Bug debug/43628] [4.5/4.6 Regression] in-class func-ptr type parameter has unspecified DW_AT_type
--- Comment #3 from dodji at gcc dot gnu dot org 2010-04-07 09:59 --- Subject: Bug 43628 Author: dodji Date: Wed Apr 7 09:59:04 2010 New Revision: 158044 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158044 Log: Fix PR debug/43628 gcc/ChangeLog: PR debug/43628 * dwarf2out.c (modified_type_die): Ignore artificial typedefs. gcc/testsuite/ChangeLog: PR debug/43628 * g++.dg/debug/dwarf2/typedef2.C: New test. Added: trunk/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43628
[Bug c++/43674] Delegating constructors are not supported
--- Comment #1 from paolo dot carlini at oracle dot com 2010-04-07 10:10 --- I don't think this is a proper use of Bugzilla: where is the bug?!? Anyway, let's CC Jason, in order to ask him to have a look at that patch, if he is not on it already... -- paolo dot carlini at oracle dot com changed: What|Removed |Added CC||jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43674
[Bug rtl-optimization/42617] TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle
--- Comment #9 from rguenth at gcc dot gnu dot org 2010-04-07 10:13 --- Subject: Bug 42617 Author: rguenth Date: Wed Apr 7 10:13:25 2010 New Revision: 158045 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158045 Log: 2010-04-07 Richard Guenther rguent...@suse.de PR middle-end/42617 * emit-rtl.c (set_mem_attributes_minus_bitpos): Do not discard plain indirect references. * fold-const.c (operand_equal_p): Guard against NULL_TREE type. * tree.c (tree_nop_conversion): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/emit-rtl.c trunk/gcc/fold-const.c trunk/gcc/tree.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42617
[Bug rtl-optimization/42617] TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle
--- Comment #10 from rguenth at gcc dot gnu dot org 2010-04-07 10:14 --- Subject: Bug 42617 Author: rguenth Date: Wed Apr 7 10:14:17 2010 New Revision: 158046 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158046 Log: 2010-04-07 Richard Guenther rguent...@suse.de PR middle-end/42617 * alias.c (ao_ref_from_mem): Without MEM_OFFSET or MEM_SIZE preserve points-to related information. Modified: trunk/gcc/ChangeLog trunk/gcc/alias.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42617
[Bug c++/42556] Unnecessary generation of a zero initializer for array with C++
--- Comment #4 from jiez at gcc dot gnu dot org 2010-04-07 10:14 --- Subject: Bug 42556 Author: jiez Date: Wed Apr 7 10:14:45 2010 New Revision: 158047 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158047 Log: cp/ PR c++/42556 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR when all of its elements are non-constant and have been split out. testsuite/ PR c++/42556 * g++.dg/init/pr42556.C: New test. Added: trunk/gcc/testsuite/g++.dg/init/pr42556.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck2.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42556
[Bug rtl-optimization/42617] TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle
--- Comment #11 from rguenth at gcc dot gnu dot org 2010-04-07 10:15 --- Subject: Bug 42617 Author: rguenth Date: Wed Apr 7 10:15:05 2010 New Revision: 158048 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158048 Log: 2010-04-07 Richard Guenther rguent...@suse.de PR middle-end/42617 * expr.c (expand_expr_real_1): For TARGET_MEM_REFs with pointer bases build simple mem attributes to retain points-to information. Modified: trunk/gcc/ChangeLog trunk/gcc/expr.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42617
[Bug rtl-optimization/42617] TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle
--- Comment #12 from rguenth at gcc dot gnu dot org 2010-04-07 10:16 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42617
[Bug c++/42556] Unnecessary generation of a zero initializer for array with C++
--- Comment #5 from jiez at gcc dot gnu dot org 2010-04-07 10:19 --- The patch I committed for this PR: http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00174.html -- jiez at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42556
[Bug fortran/43591] PPC: internal compiler error: in gfc_traverse_expr, at fortran/expr.c:3604
--- Comment #14 from burnus at gcc dot gnu dot org 2010-04-07 10:20 --- Looked at the wrong check. The following (lightly tested) should work: Index: gcc/fortran/expr.c === --- gcc/fortran/expr.c (revision 158042) +++ gcc/fortran/expr.c (working copy) @@ -782,6 +782,8 @@ gfc_is_constant_expr (gfc_expr *e) break; case EXPR_FUNCTION: +case EXPR_PPC: +case EXPR_COMPCALL: /* Specification functions are constant. */ if (check_specification_function (e) == MATCH_YES) { @@ -2808,6 +2810,7 @@ check_restricted (gfc_expr *e) gfc_try gfc_specification_expr (gfc_expr *e) { + gfc_component *comp; if (e == NULL) return SUCCESS; @@ -2822,7 +2825,9 @@ gfc_specification_expr (gfc_expr *e) if (e-expr_type == EXPR_FUNCTION !e-value.function.isym !e-value.function.esym - !gfc_pure (e-symtree-n.sym)) + !gfc_pure (e-symtree-n.sym) + (!gfc_is_proc_ptr_comp (e, comp) + || !comp- attr.pure)) { gfc_error (Function '%s' at %L must be PURE, e-symtree-n.sym-name, e-where); @@ -3560,6 +3565,8 @@ gfc_traverse_expr (gfc_expr *expr, gfc_s switch (expr-expr_type) { +case EXPR_PPC: +case EXPR_COMPCALL: case EXPR_FUNCTION: for (args = expr-value.function.actual; args; args = args-next) { -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43591
[Bug c++/43672] Not compiled Qt library
--- Comment #1 from redi at gcc dot gnu dot org 2010-04-07 10:33 --- Only the very last compilation command is of any interest, but you didn't even say what version of GCC you are using so noone can help -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43672
[Bug target/43610] [4.5/4.6 Regression] ICE: in prepare_float_lib_cmp, at optabs.c:4392 with -fno-trapping-math and _Decimal64 comparison
--- Comment #8 from bonzini at gnu dot org 2010-04-07 10:33 --- The patch is mostly splitting an if statement in two parts. If anyone can test it for 4.5.1/4.6 that would be nice. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43610
[Bug debug/43628] [4.5/4.6 Regression] in-class func-ptr type parameter has unspecified DW_AT_type
--- Comment #4 from dodji at gcc dot gnu dot org 2010-04-07 10:38 --- Fixed in 4.6 (trunk) -- dodji at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43628
[Bug driver/41594] -static-libstdc++ is not recognized as valid by the gcc driver.
--- Comment #2 from iains at gcc dot gnu dot org 2010-04-07 10:40 --- Subject: Bug 41594 Author: iains Date: Wed Apr 7 10:40:06 2010 New Revision: 158052 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158052 Log: 2010-04-07 Iain Sandoe ia...@gcc.gnu.org PR driver/41594 * gcc.c: Add -static-libstdc++ to list of recognized options. Modified: trunk/gcc/ChangeLog trunk/gcc/gcc.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41594
[Bug driver/41594] -static-libstdc++ is not recognized as valid by the gcc driver.
--- Comment #3 from iains at gcc dot gnu dot org 2010-04-07 10:40 --- 2010-04-07 Iain Sandoe ia...@gcc.gnu.org PR driver/41594 * gcc.c: Add -static-libstdc++ to list of recognized options. MChangeLog Mgcc.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41594
[Bug driver/41594] -static-libstdc++ is not recognized as valid by the gcc driver.
--- Comment #4 from iains at gcc dot gnu dot org 2010-04-07 10:44 --- sorry about the double message.. I know now ;) -- iains at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41594
[Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
--- Comment #5 from vincent at vinc17 dot org 2010-04-07 10:58 --- This bug should probably be resolved as fixed as well. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
[Bug c/39037] FLOAT_CONST_DECIMAL64 pragma not supported
--- Comment #6 from rguenth at gcc dot gnu dot org 2010-04-07 11:06 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39037
[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 bootstrap/43531] [4.5/4.6 Regression] host files being used during cross compilation
--- Comment #25 from joel at gcc dot gnu dot org 2010-04-07 12:11 --- Although we may seem paranoid and picky, these can break things in a very weird and very hard to debug way. I just tripped across another place where gcc/config is passed as an include directory to the build of a language run-time library cross. It showed up because there was a file name conflict between gcc internal .h files and the support .h files on the target. It is better to kill these. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43531
[Bug rtl-optimization/42617] TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle
--- Comment #13 from rguenth at gcc dot gnu dot org 2010-04-07 12:15 --- *** Bug 22031 has been marked as a duplicate of this bug. *** -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||falk at debian dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42617
[Bug rtl-optimization/22031] Poor code from unrolled simple loop
--- Comment #8 from rguenth at gcc dot gnu dot org 2010-04-07 12:15 --- Fixed as part of PR42617. *** This bug has been marked as a duplicate of 42617 *** -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22031
[Bug tree-optimization/33974] [meta-bug] memory partitioning sucks
--- Comment #7 from rguenth at gcc dot gnu dot org 2010-04-07 12:23 --- Didn't I say fixed? -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33974
[Bug tree-optimization/29738] Missed constant propagation into loops
--- Comment #13 from rguenth at gcc dot gnu dot org 2010-04-07 12:21 --- A case predicated VN should handle. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||matz at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29738
[Bug c++/43674] Delegating constructors are not supported
--- Comment #2 from jason at gcc dot gnu dot org 2010-04-07 12:28 --- The patch is not complete; it's linked there in case someone wants to use it as a starting point. Specifically, it fails to distinguish between the different constructor variants. -- jason at gcc dot gnu dot org changed: What|Removed |Added Severity|normal |enhancement Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-04-07 12:28:26 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43674
[Bug tree-optimization/43270] array-bounds false negative
--- Comment #15 from rguenth at gcc dot gnu dot org 2010-04-07 12:31 --- Subject: Bug 43270 Author: rguenth Date: Wed Apr 7 12:31:32 2010 New Revision: 158058 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158058 Log: 2010-04-07 Richard Guenther rguent...@suse.de PR tree-optimization/43270 * tree-vrp.c (check_array_ref): Fix flexible array member detection. * tree-ssa-sccvn.h (fully_constant_vn_reference_p): Declare. * tree-ssa-pre.c (phi_translate_1): Adjust. (fully_constant_expression): Split out vn_reference handling to ... * tree-ssa-sccvn.c (fully_constant_vn_reference_p): ... here. Fold reads from constant strings. (vn_reference_lookup): Handle fully constant references. (vn_reference_lookup_pieces): Likewise. * Makefile.in (expmed.o-warn): Add -Wno-error. * g++.dg/warn/Warray-bounds-4.C: New testcase. * gcc.dg/Warray-bounds-7.c: Likewise. Added: trunk/gcc/testsuite/g++.dg/warn/Warray-bounds-4.C trunk/gcc/testsuite/gcc.dg/Warray-bounds-7.c Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c trunk/gcc/tree-ssa-sccvn.c trunk/gcc/tree-ssa-sccvn.h trunk/gcc/tree-vrp.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43270
[Bug tree-optimization/43270] array-bounds false negative
--- Comment #16 from rguenth at gcc dot gnu dot org 2010-04-07 12:34 --- Fixed for 4.6. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43270
[Bug bootstrap/43531] [4.5 Regression] host files being used during cross compilation
--- Comment #26 from rguenth at gcc dot gnu dot org 2010-04-07 12:56 --- Fixed for 4.5.0 AFAICS. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED Summary|[4.5/4.6 Regression] host |[4.5 Regression] host files |files being used during |being used during cross |cross compilation |compilation Target Milestone|4.5.1 |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43531
[Bug bootstrap/43531] [4.5 Regression] host files being used during cross compilation
--- Comment #27 from corsepiu at gcc dot gnu dot org 2010-04-07 13:38 --- (In reply to comment #26) Fixed for 4.5.0 AFAICS. Is the patch you are referring to in 4.5.0-RC-20100406? IIRC, snapshot 4.5-20100401 has had this issue, but I can't find any it anymore in my 4.5.0-RC-20100406 build logs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43531
[Bug bootstrap/43531] [4.5 Regression] host files being used during cross compilation
--- Comment #28 from rguenth at gcc dot gnu dot org 2010-04-07 13:41 --- (In reply to comment #27) (In reply to comment #26) Fixed for 4.5.0 AFAICS. Is the patch you are referring to in 4.5.0-RC-20100406? IIRC, snapshot 4.5-20100401 has had this issue, but I can't find any it anymore in my 4.5.0-RC-20100406 build logs. Yes, the patch is in the release-candidate. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43531
[Bug debug/43516] [4.5 Regression] -fcompare-debug failure at -O2
--- Comment #19 from jakub at gcc dot gnu dot org 2010-04-07 14:23 --- Subject: Bug 43516 Author: jakub Date: Wed Apr 7 14:23:35 2010 New Revision: 158062 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158062 Log: PR debug/43516 * tree.c (MAX_INT_CACHED_PREC): Define. (nonstandard_integer_type_cache): New array. (build_nonstandard_integer_type): Cache results for precision = MAX_INT_CACHED_PREC. Modified: trunk/gcc/ChangeLog trunk/gcc/tree.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43516
[Bug target/43669] libgcc build fails with Error: cannot represent subtraction with an offset
--- Comment #1 from segher at gcc dot gnu dot org 2010-04-07 14:53 --- cc:ing maintainer -- segher at gcc dot gnu dot org changed: What|Removed |Added CC||bob dot wilson at acm dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43669
[Bug target/43675] New: [m68k] Wrong code due to missing sign extension
When compiling the following function for a coldfire target, such as mcf5249: (using the following command line: m68k-elf-gcc saturate.c -mcpu=5249 -O1 -S) int saturate(int x) { return (x == (short)x ? x : (x 31) ^ 0x7FFF); } gcc produces: saturate: link.w %fp,#0 move.l 8(%fp),%d0 move.w %d0,%a0 cmp.l %a0,%d0 jeq .L2 add.l %d0,%d0 subx.l %d0,%d0 eor.l #32767,%d0 .L2: unlk %fp rts Where a0 is compared to d0 without a sign extension so the upper half of a0 remtains whatever was already there. This is with gcc: 4.5.0 20100401 (experimental) (GCC) configured with: --target=m68k-elf --prefix=/usr/local --enable-languages=c --disable-libssp --with-arch=cf --with-cpu=5249 Also observed with gcc 3.4.6 so likely not a regression. -- Summary: [m68k] Wrong code due to missing sign extension Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nizze86 at hotmail dot com GCC target triplet: m68k-elf-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug target/43668] [4.4/4.5/4.6 Regression] -fschedule-insns causes FAIL: gcc.target/i386/vararg-1.c execution test
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|--- |4.4.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43668
[Bug rtl-optimization/43616] Extra register move
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Severity|normal |enhancement Summary|[4.5, trunk] Extra register |Extra register move |move| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43616
[Bug target/43676] New: [m68k] Wrong code due to missing sign extension
When compiling the following function for a coldfire target, such as mcf5249: (using the following command line: m68k-elf-gcc saturate.c -mcpu=5249 -O1 -S) int saturate(int x) { return (x == (short)x ? x : (x 31) ^ 0x7FFF); } gcc produces: saturate: link.w %fp,#0 move.l 8(%fp),%d0 move.w %d0,%a0 cmp.l %a0,%d0 jeq .L2 add.l %d0,%d0 subx.l %d0,%d0 eor.l #32767,%d0 .L2: unlk %fp rts Where a0 is compared to d0 without a sign extension so the upper half of a0 remtains whatever was already there. This is with gcc: 4.5.0 20100401 (experimental) (GCC) configured with: --target=m68k-elf --prefix=/usr/local --enable-languages=c --disable-libssp --with-arch=cf --with-cpu=5249 Also observed with gcc 3.4.6 so likely not a regression. -- Summary: [m68k] Wrong code due to missing sign extension Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nizze86 at hotmail dot com GCC target triplet: m68k-elf-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43676
[Bug target/43675] [m68k] Wrong code due to missing sign extension
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-04-07 15:03 --- *** Bug 43676 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug target/43676] [m68k] Wrong code due to missing sign extension
--- Comment #1 from rguenth at gcc dot gnu dot org 2010-04-07 15:03 --- *** This bug has been marked as a duplicate of 43675 *** -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43676
[Bug c++/43648] [4.5/4.6 regression] ICE with explicit destructor call and typedef
--- Comment #5 from jason at gcc dot gnu dot org 2010-04-07 15:03 --- Subject: Bug 43648 Author: jason Date: Wed Apr 7 15:02:55 2010 New Revision: 158065 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158065 Log: PR c++/43648 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs. Added: branches/gcc-4_5-branch/gcc/testsuite/g++.dg/template/dtor8.C Modified: branches/gcc-4_5-branch/gcc/cp/ChangeLog branches/gcc-4_5-branch/gcc/cp/parser.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648
[Bug c++/40239] Aggregate initialization requires copy constructor
--- Comment #8 from dodji at gcc dot gnu dot org 2010-04-07 15:12 --- Subject: Bug 40239 Author: dodji Date: Wed Apr 7 15:11:42 2010 New Revision: 158066 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158066 Log: Fix PR c++/40239 gcc/cp/ChangeLog: PR c++/40239 * typeck2.c (process_init_constructor_record): value-initialize members that are are not explicitely initialized. gcc/testsuite/ChangeLog: PR c++/40239 * g++.dg/init/aggr5.C: New test. * g++.dg/init/aggr5.C: New test. Added: trunk/gcc/testsuite/g++.dg/init/aggr5.C trunk/gcc/testsuite/g++.dg/init/aggr6.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck2.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40239
[Bug c++/40239] Aggregate initialization requires copy constructor
--- Comment #9 from dodji at gcc dot gnu dot org 2010-04-07 15:12 --- Fixed in 4.6 (trunk). -- dodji at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40239
[Bug c++/42697] ice-on-legal-code: template class template function local objects
--- Comment #14 from dodji at gcc dot gnu dot org 2010-04-07 15:16 --- Subject: Bug 42697 Author: dodji Date: Wed Apr 7 15:16:12 2010 New Revision: 158068 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158068 Log: Fix PR c++/42697 gcc/cp/ChangeLog: PR c++/42697 *pt.c (tsubst_decl): Get the arguments of a specialization from the specialization template, not from the most general template. gcc/testsuite/ChangeLog: PR c++/42697 * g++.dg/template/crash94.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/crash94.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42697
[Bug c++/42697] ice-on-legal-code: template class template function local objects
--- Comment #15 from dodji at gcc dot gnu dot org 2010-04-07 15:18 --- Fixed in 4.6 (trunk) -- dodji at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42697
[Bug target/43675] [m68k] Wrong code due to missing sign extension
--- Comment #2 from maxim at codesourcery dot com 2010-04-07 15:24 --- The problem is in 68k_extendhisi2 pattern, second alternative: (define_insn *68k_extendhisi2 [(set (match_operand:SI 0 nonimmediate_operand =*d,a) (sign_extend:SI (match_operand:HI 1 nonimmediate_src_operand 0,rmS)))] !ISA_HAS_MVS_MVZ @ ext%.l %0 move%.w %1,%0 [(set_attr type ext,move)]) Move.w instruction on ColdFire indeed preserves the upper bits, I found out that by luck in the coldfire uclinux kernel port, no reference manual that I know of spells out this behavior. I have a serious suspicion, though, that move.w on classic m68k does perform sign extension. Can anyone confirm this? If this is so, then the fix is to disable the second alternative when compiling for ColdFire, e.g., by setting attribute ok_for_coldfire to no. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug tree-optimization/43629] [4.3/4.4 Regression] Struct to register optimization fails
--- Comment #11 from rguenth at gcc dot gnu dot org 2010-04-07 15:41 --- Subject: Bug 43629 Author: rguenth Date: Wed Apr 7 15:40:43 2010 New Revision: 158070 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158070 Log: 2010-04-07 Richard Guenther rguent...@suse.de PR tree-optimization/43629 * tree-ssa-ccp.c (likely_value): Properly look for constant values. Reset all_undefined_operands if we have seen a constant value. * gcc.c-torture/execute/pr43629.c: New testcase. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr43629.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/tree-ssa-ccp.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43629
[Bug target/43675] [m68k] Wrong code due to missing sign extension
--- Comment #3 from nizze86 at hotmail dot com 2010-04-07 15:42 --- I am sorry, it appears i am mistaken, since the dest is an address reg, movea is used which apparently *does* sign extend word size source to 32 bits while a move to a d reg does not. Again sorry for the noise. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug tree-optimization/43629] [4.3 Regression] Struct to register optimization fails
--- Comment #12 from rguenth at gcc dot gnu dot org 2010-04-07 15:44 --- And backported for 4.4.4. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Known to work|4.2.4 4.5.0 |4.2.4 4.4.4 4.5.0 Summary|[4.3/4.4 Regression] Struct |[4.3 Regression] Struct to |to register optimization|register optimization fails |fails | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43629
[Bug target/43129] Simplify global variable's address loading with option -fpic
--- Comment #4 from rth at gcc dot gnu dot org 2010-04-07 15:45 --- My best guess is that this optimization should be done late. For instance, in the machine-dependant reorg pass. I don't see any place to hook this earlier. The problem is that reload should be able to spill pseudos containing your got addresses and re-compute them from the given constants rather than consuming a stack slot to hold the computed value. Which means that the number of instances of got address loads may vary until after reload, which means that any size estimation calculation you do earlier can be off. The down-side to doing it after reload is that you will have committed to saving and restoring arm_pic_register in the prologue and epilogue. Given that arm uses ldm/stm this ought not impact your code size often, but will in the extreme case of a leaf function with no other saved registers. I guess you'll have to experiment with your implementation to see what gives the best results on a large body of code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129
[Bug target/43677] New: #8216;__powitf2#8217;: unrecognizable insn
While building gcc-4_5-branch @158068: /home/andreas/src/gcc/branch/gcc-4.5/x86-64/./gcc/xgcc -B/home/andreas/src/gcc/branch/gcc-4.5/x86-64/./gcc/ -B/usr/x86_64-linux/bin/ -B/usr/x86_64-linux/lib/ -isystem /usr/x86_64-linux/include -isystem /usr/x86_64-linux/sys-include-O2 -g -m32 -O2 -O2 -g -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../.././gcc -I../../../../gcc/libgcc -I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc -I../../../../gcc/libgcc/../include -I../../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _powitf2.o -MT _powitf2.o -MD -MP -MF _powitf2.dep -DL_powitf2 -c ../../../../gcc/libgcc/../gcc/libgcc2.c \ -fvisibility=hidden -DHIDE_EXPORTS ../../../../gcc/libgcc/../gcc/libgcc2.c: In function #8216;__powitf2#8217;: ../../../../gcc/libgcc/../gcc/libgcc2.c:1739:1: error: unrecognizable insn: (insn 27 26 28 7 ../../../../gcc/libgcc/../gcc/libgcc2.c:1734 (set (mem:SI (reg/f:SI 56 virtual-outgoing-args) [0 S4 A32]) (plus:SI (reg/f:SI 54 virtual-stack-vars) (const_int -16 [0xfff0]))) -1 (nil)) ../../../../gcc/libgcc/../gcc/libgcc2.c:1739:1: internal compiler error: in extract_insn, at recog.c:2104 -- Summary: #8216;__powitf2#8217;: unrecognizable insn Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, build Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: schwab at linux-m68k dot org GCC target triplet: x86_64-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43677
[Bug c++/41970] use of a type with no linkage to declare a variable with linkage
--- Comment #20 from jason at gcc dot gnu dot org 2010-04-07 15:54 --- Subject: Bug 41970 Author: jason Date: Wed Apr 7 15:54:17 2010 New Revision: 158071 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158071 Log: PR c++/41970 * decl.c (grokvardecl): Tweak warning message. (grokfndecl): Likewise. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.old-deja/g++.other/linkage1.C -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41970
[Bug c++/38392] Template friend function injection
--- Comment #21 from jason at gcc dot gnu dot org 2010-04-07 15:55 --- Subject: Bug 38392 Author: jason Date: Wed Apr 7 15:54:42 2010 New Revision: 158073 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158073 Log: PR c++/38392 * pt.c (tsubst_friend_function): Instatiate a friend that has already been used. Added: trunk/gcc/testsuite/g++.dg/template/friend51.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392
[Bug c++/11094] [DR408] incomplete static member breaks sizeof containing template class
--- Comment #7 from jason at gcc dot gnu dot org 2010-04-07 15:56 --- Subject: Bug 11094 Author: jason Date: Wed Apr 7 15:55:20 2010 New Revision: 158075 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158075 Log: PR c++/11094, DR 408 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New. * decl2.c (finish_static_data_member_decl): Set it. * decl.c (duplicate_decls): Propagate it. * pt.c (tsubst_decl): Don't substitute the domain of an array VAR_DECL if it's set. (regenerate_decl_from_template): Substitute it here. (type_dependent_expression_p): Return true if it's set. * semantics.c (finish_decltype_type): Instantiate such a variable. * typeck.c (cxx_sizeof_expr): Likewise. (strip_array_domain): New. Added: trunk/gcc/testsuite/g++.dg/template/dr408.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/decl2.c trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11094
[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 target/43675] [m68k] Wrong code due to missing sign extension
--- Comment #4 from maxim at codesourcery dot com 2010-04-07 16:04 --- Hm, move.w preserving upper bits seems to apply only if destination is a data register then. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug target/43675] [m68k] Wrong code due to missing sign extension
--- Comment #5 from mkuvyrkov at gcc dot gnu dot org 2010-04-07 16:06 --- Closing the PR. -- mkuvyrkov at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug target/43675] [m68k] Wrong code due to missing sign extension
--- Comment #6 from schwab at linux-m68k dot org 2010-04-07 16:15 --- MOVEA always sign extends. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43675
[Bug c++/43648] [4.5/4.6 regression] ICE with explicit destructor call and typedef
--- Comment #6 from bangerth at gmail dot com 2010-04-07 16:17 --- Jason, thanks a lot for the quick turnaround, and my apologies for not testing this stuff on a more frequent basis so I find earlier than the day before branch day :-) W. -- bangerth at gmail dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43648
[Bug objc++/23716] obj-c++.dg/comp-types-10.mm ICE with the GNU runtime
--- Comment #13 from iains at gcc dot gnu dot org 2010-04-07 16:20 --- Subject: Bug 23716 Author: iains Date: Wed Apr 7 16:20:08 2010 New Revision: 158076 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158076 Log: fix PR23716 2010-04-07 Iain Sandoe ia...@gcc.gnu.org PR objc++/23716 * objc-act.c (build_module_initializer_routine): Make the argument to objc_start_function NULL_TREE when compiling ObjC++. 2010-04-07 Iain Sandoe ia...@gcc.gnu.org PR objc++/23716 * obj-c++.dg/comp-types-10.mm: Remove XFAIL. Modified: trunk/gcc/objc/ChangeLog trunk/gcc/objc/objc-act.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/obj-c++.dg/comp-types-10.mm -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23716
[Bug tree-optimization/43670] -fcompare-debug failure (length) with -O -ftree-vrp
--- Comment #2 from jakub at gcc dot gnu dot org 2010-04-07 16:49 --- Ugh, apparently nothing clears TREE_ADDRESSABLE on x when not -g, only with -g (x really isn't addressable in the end). So, here -g generates better code than -g0. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43670
[Bug tree-optimization/43670] -fcompare-debug failure (length) with -O -ftree-vrp
--- Comment #3 from jakub at gcc dot gnu dot org 2010-04-07 17:00 --- I've messed this up. Of course it is the other way around, and it is discover_nonconstant_array_refs that marks x TREE_ADDRESSABLE because of an occurrence in DEBUG_STMT. Sorry for the previous premature comment. -- jakub at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-04-07 17:00:43 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43670
[Bug c++/43641] [C++0x] internal compiler error: tree check: expected call_expr, have target_expr in maybe_add_lambda_conv_op
--- Comment #5 from wilhelm at segatz dot org 2010-04-07 17:31 --- sourced compiled with gcc version 4.5.0 20100311 (experimental) (GCC) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43641
[Bug debug/43670] -fcompare-debug failure (length) with -O -ftree-vrp
--- Comment #4 from jakub at gcc dot gnu dot org 2010-04-07 17:47 --- Created an attachment (id=20329) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20329action=view) gcc45-pr43670.patch Untested fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43670
[Bug debug/43670] [4.5/4.6 Regression] -fcompare-debug failure (length) with -O -ftree-vrp
-- jakub at gcc dot gnu dot org changed: What|Removed |Added Summary|-fcompare-debug failure|[4.5/4.6 Regression] - |(length) with -O -ftree-vrp|fcompare-debug failure ||(length) with -O -ftree-vrp Target Milestone|--- |4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43670
[Bug libstdc++/40518] data races when calling std::string::erase() on empty string
--- Comment #11 from bart dot vanassche at gmail dot com 2010-04-07 17:54 --- (In reply to comment #10) I think this is for mainline only. In a couple of few weeks a I will give it a second thought for 4_4-branch but certainly isn't a regression. Any status update here ? Many Helgrind and DRD users would be grateful if this could be backported to gcc 4.4. -- bart dot vanassche at gmail dot com changed: What|Removed |Added CC||bart dot vanassche at gmail ||dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518
[Bug fortran/40539] Inversion of logical function compiled with ifort not correct.
--- Comment #11 from jb at gcc dot gnu dot org 2010-04-07 18:01 --- Subject: Bug 40539 Author: jb Date: Wed Apr 7 18:01:24 2010 New Revision: 158080 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158080 Log: PR fortran/40539 Document LOGICAL representation Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/gfortran.texi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40539
[Bug fortran/40539] Inversion of logical function compiled with ifort not correct.
--- Comment #12 from jb at gcc dot gnu dot org 2010-04-07 18:08 --- Subject: Bug 40539 Author: jb Date: Wed Apr 7 18:07:48 2010 New Revision: 158081 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158081 Log: PR fortran/40539 Document LOGICAL representation Modified: branches/gcc-4_4-branch/gcc/fortran/ChangeLog branches/gcc-4_4-branch/gcc/fortran/gfortran.texi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40539
[Bug libstdc++/40518] data races when calling std::string::erase() on empty string
--- Comment #12 from paolo dot carlini at oracle dot com 2010-04-07 18:11 --- In my opinion it's too late now, I'm not even sure a 4.4.4 will be released any time soon, and 4.5.0 is around the corner. But if Jon would also like to see it in 4.4.4 and wants to backport the patch I do not object. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518
[Bug target/43671] [4.4/4.5/4.6 Regression] -fsched2-use-superblocks -m32 produces wrong code with vectorization
--- Comment #4 from hjl dot tools at gmail dot com 2010-04-07 18:36 --- It is caused by revision 138953: http://gcc.gnu.org/ml/gcc-cvs/2008-08/msg00512.html -- hjl dot tools at gmail dot com changed: What|Removed |Added CC||matz at suse dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43671
[Bug libstdc++/40518] data races when calling std::string::erase() on empty string
--- Comment #13 from redi at gcc dot gnu dot org 2010-04-07 19:06 --- I agree it's probably not worth backporting to a release branch, it wasn't a regression. Haven't affected users written valgrind suppression files by now? :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40518
[Bug middle-end/43678] New: [gcc-plugin] Internal error under GDB: Killed program cc1plus.
$ make gdb-check /opt/gcc45/bin/gcc45 -O1 -g2 -fPIC -Wall -I/opt/gcc45/lib64/gcc/x86_64-unknown-linux-gnu/4.5.0/plugin/include -fvisibility=hidden my-plugin.c -shared -o my-plugin.so gdb -x ./.gdbinit --args /opt/gcc45/bin/gcc45 -fplugin=./my-plugin.so -c example.hpp -o /dev/null GNU gdb (GDB) PLD Linux (7.0-3) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-pld-linux. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /opt/gcc45/bin/gcc45...done. Function plugin_init not defined. Breakpoint 1 (plugin_init) pending. [New process 32537] Executing new program: /opt/gcc45/lib64/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus [Switching to process 32537] Breakpoint 1, plugin_init (args=0x11a9990, version=0x10fbae0) at my-plugin.c:7 7 } Breakpoint 2 at 0x76d9b53c: file my-plugin.c, line 7. gcc45: Internal error: Killed (program cc1plus) Please submit a full bug report. See http://gcc.gnu.org/bugs.html for instructions. cc1plus: error: unrecognized command line option -c Breakpoint 1, plugin_init (args=0x11a9990, version=0x10fbae0) at my-plugin.c:7 -- Summary: [gcc-plugin] Internal error under GDB: Killed program cc1plus. Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net GCC build triplet: x86_64-gnu-linux GCC host triplet: x86_64-gnu-linux GCC target triplet: x86_64-gnu-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43678
[Bug middle-end/43678] [gcc-plugin] Internal error under GDB: Killed program cc1plus.
--- Comment #1 from pluto at agmk dot net 2010-04-07 19:36 --- Created an attachment (id=20330) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20330action=view) testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43678
[Bug objc/35996] ICE while building simple ObjC code with -fobjc-gc
--- Comment #7 from iains at gcc dot gnu dot org 2010-04-07 19:58 --- Subject: Bug 35996 Author: iains Date: Wed Apr 7 19:57:46 2010 New Revision: 158083 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158083 Log: gcc/objc/Changelog: 2010-04-07 Iain Sandoe ia...@gcc.gnu.org PR objc/35996 * objc-act.c (objc_init): Warn that -fobjc-gc is ignored for -fgnu-runtime and set flag_objc_gc to zero. testsuite: 2010-04-07 Iain Sandoe ia...@gcc.gnu.org PR objc/35996 * objc.dg/objc-gc-4.m: Run for all targets, prune new warning. * obj-c++.dg/objc-gc-3.mm: Ditto. Modified: trunk/gcc/objc/ChangeLog trunk/gcc/objc/objc-act.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/obj-c++.dg/objc-gc-3.mm trunk/gcc/testsuite/objc.dg/objc-gc-4.m -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35996
[Bug objc/35996] ICE while building simple ObjC code with -fobjc-gc
--- Comment #8 from iains at gcc dot gnu dot org 2010-04-07 20:05 --- AFAICT, this should be fixed now. -- iains at gcc dot gnu dot org changed: What|Removed |Added CC||iains at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35996
[Bug c/43679] New: ice in gen_lsm_tmp_name, at tree-ssa-loop-im.c:1812
[reg...@gamow tmp400]$ current-gcc -c -O2 small.c small.c: In function 'func_37': small.c:11:6: internal compiler error: in gen_lsm_tmp_name, at tree-ssa-loop-im.c:1812 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. [reg...@gamow tmp400]$ cat small.c unsigned g_5; int g_7; int g_23[2]; int *g_29 = g_23[0]; int **g_59; unsigned long g_186; int foo (int, int); int bar (int); void func_37 (long p_38) { int *l_39 = g_7; *l_39 = (*l_39 || (foo (((*g_29 != *l_39, ((bar (g_59 != l_39), 0), 0))), 0))); foo (*l_39, 0); int **l_256 = l_39; { for (0; g_186; 0) { *l_256 = *l_256; if (g_5) goto lbl_270; *l_39 = 0; } } lbl_270: ; } [reg...@gamow tmp400]$ current-gcc -v Using built-in specs. COLLECT_GCC=current-gcc COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r158079-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../configure --with-libelf=/usr/local --enable-lto --prefix=/home/regehr/z/compiler-install/gcc-r158079-install --program-prefix=r158079- --enable-languages=c,c++ Thread model: posix gcc version 4.6.0 20100407 (experimental) (GCC) -- Summary: ice in gen_lsm_tmp_name, at tree-ssa-loop-im.c:1812 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: regehr at cs dot utah dot edu GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43679
[Bug c/18624] GCC does not detect local variable set but never used
--- Comment #23 from jakub at gcc dot gnu dot org 2010-04-07 20:34 --- Subject: Bug 18624 Author: jakub Date: Wed Apr 7 20:33:36 2010 New Revision: 158086 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158086 Log: PR c/18624 * tree.h (DECL_READ_P): Define. (struct tree_decl_common): Add decl_read_flag. * c-decl.c (pop_scope): If TREE_USED but !DECL_READ_P, issue a set but not used warning. (merge_decls): Merge DECL_READ_P flag. (finish_decl, build_compound_literal): Set DECL_READ_P flag. (finish_function): Issue -Wunused-but-set-parameter diagnostics. * c-common.c (handle_used_attribute, handle_unused_attribute): Likewise. * c-tree.h (default_function_array_read_conversion, mark_exp_read): New prototypes. * c-typeck.c (default_function_array_read_conversion, mark_exp_read): New functions. (default_conversion, c_process_expr_stmt): Call mark_exp_read. * c-parser.c (c_parser_initializer, c_parser_expr_no_commas, c_parser_binary_expression, c_parser_cast_expression, c_parser_expr_list, c_parser_omp_atomic, c_parser_omp_for_loop): Call default_function_array_read_conversion instead of default_function_array_conversion where needed. (c_parser_unary_expression, c_parser_conditional_expression, c_parser_postfix_expression_after_primary, c_parser_initelt): Likewise. Call mark_exp_read where needed. (c_parser_statement_after_labels, c_parser_asm_operands, c_parser_typeof_specifier, c_parser_sizeof_expression, c_parser_alignof_expression, c_parser_initval): Call mark_exp_read where needed. * common.opt (Wunused-but-set-variable, Wunused-but-set-parameter): New. * toplev.c (warn_unused_but_set_variable): Default to warn_unused. (warn_unused_but_set_parameter): Default to warn_unused extra_warnings. * doc/invoke.texi: Document -Wunused-but-set-variable and -Wunused-but-set-parameter. * objc-act.c (finish_var_decl, objc_begin_catch_clause, really_start_method, get_super_receiver, handle_class_ref): Set DECL_READ_P in addition to TREE_USED. * gcc.dg/Wunused-var-1.c: New test. * gcc.dg/Wunused-var-2.c: New test. * gcc.dg/Wunused-var-3.c: New test. * gcc.dg/Wunused-var-4.c: New test. * gcc.dg/Wunused-var-5.c: New test. * gcc.dg/Wunused-var-6.c: New test. * gcc.dg/Wunused-parm-1.c: New test. Added: trunk/gcc/testsuite/gcc.dg/Wunused-parm-1.c trunk/gcc/testsuite/gcc.dg/Wunused-var-1.c trunk/gcc/testsuite/gcc.dg/Wunused-var-2.c trunk/gcc/testsuite/gcc.dg/Wunused-var-3.c trunk/gcc/testsuite/gcc.dg/Wunused-var-4.c trunk/gcc/testsuite/gcc.dg/Wunused-var-5.c trunk/gcc/testsuite/gcc.dg/Wunused-var-6.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-common.c trunk/gcc/c-decl.c trunk/gcc/c-parser.c trunk/gcc/c-tree.h trunk/gcc/c-typeck.c trunk/gcc/common.opt trunk/gcc/doc/invoke.texi trunk/gcc/objc/ChangeLog trunk/gcc/objc/objc-act.c trunk/gcc/testsuite/ChangeLog trunk/gcc/toplev.c trunk/gcc/tree.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18624
[Bug c++/43663] Can't take a const-ref to a bit field
--- Comment #5 from jason at gcc dot gnu dot org 2010-04-07 21:19 --- Long-standing bug. -- jason at gcc dot gnu dot org changed: What|Removed |Added Known to fail|4.5.0 |2.95.4 4.5.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43663
[Bug target/43668] [4.4/4.5/4.6 Regression] -fschedule-insns causes FAIL: gcc.target/i386/vararg-1.c execution test
--- Comment #4 from hjl at gcc dot gnu dot org 2010-04-07 21:49 --- Subject: Bug 43668 Author: hjl Date: Wed Apr 7 21:48:51 2010 New Revision: 158092 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158092 Log: Align stack to 16byte for FP register save area. gcc/ 2010-04-06 H.J. Lu hongjiu...@intel.com PR target/43668 * config/i386/i386.c (setup_incoming_varargs_64): Align stack to 16byte for FP register save area. gcc/testsuite/ 2010-04-06 H.J. Lu hongjiu...@intel.com PR target/43668 * gcc.target/i386/pr43668.c: New. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr43668.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/config/i386/i386.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43668
[Bug c++/43680] New: G++ is too aggressive in optimizing away bounds checking with enums
With -O2, this testcase aborts on x86_64: extern C void abort (); enum E { A, B, C, D }; void CheckE(const E value) { long v = value; if (v = D) abort (); } int main() { CheckE(static_castE(5)); } Presumably something in the middle- or back-end is believing what the C++ front end sets TYPE_MAX_VALUE to and optimizing based on the assumption that value cannot be greater than 3. I think the C++ standard can definitely be read to allow this optimization, but it means optimizing away bounds checking, which is a serious security problem. The standard should be fixed. -- Summary: G++ is too aggressive in optimizing away bounds checking with enums Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: c++ AssignedTo: jason at gcc dot gnu dot org ReportedBy: jason at gcc dot gnu dot org GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
[Bug c++/43680] G++ is too aggressive in optimizing away bounds checking with enums
-- jason 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 21:51:39 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
[Bug target/37440] [4.4/4.5/4.6 Regression] GNAT Bug Box a-ngcefu.adb:397
--- Comment #8 from joel at gcc dot gnu dot org 2010-04-07 21:55 --- /users/joel/test-gcc/b-gcc2-arm/./gcc/xgcc -B/users/joel/test-gcc/b-gcc2-arm/./gcc/ -nostdinc -B/users/joel/test-gcc/b-gcc2-arm/arm-rtems4.10/newlib/ -isystem /users/joel/test-gcc/b-gcc2-arm/arm-rtems4.10/newlib/targ-include -isystem /users/joel/test-gcc/gcc-svn/newlib/libc/include -B/users/joel/test-gcc/install-svn/arm-rtems4.10/bin/ -B/users/joel/test-gcc/install-svn/arm-rtems4.10/lib/ -isystem /users/joel/test-gcc/install-svn/arm-rtems4.10/include -isystem /users/joel/test-gcc/install-svn/arm-rtems4.10/sys-include-c -g -O0 -W -Wall -gnatpg -mthumb a-nlcefu.ads -o a-nlcefu.o This gives an ICE at -O2, -O1 and -O0 as shown above. +===GNAT BUG DETECTED==+ | 4.6.0 20100407 (experimental) [trunk revision 158082] (arm-unknown-rtems4.10) GCC error:| | in find_valid_class, at reload.c:704 | | Error detected around a-ngcefu.adb:115:8 | | Please submit a bug report; see http://gcc.gnu.org/bugs.html.| | Use a subject line meaningful to you and us to track the bug.| | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==+ If there is anything I can do to help narrow this down, let me know. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37440
[Bug c++/43680] G++ is too aggressive in optimizing away bounds checking with enums
-- jason at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |ASSIGNED Known to fail||4.3.5 4.4.3 4.5.0 Last reconfirmed|2010-04-07 21:51:39 |2010-04-07 21:56:00 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
[Bug target/43668] [4.4/4.5/4.6 Regression] -fschedule-insns causes FAIL: gcc.target/i386/vararg-1.c execution test
--- Comment #5 from hjl at gcc dot gnu dot org 2010-04-07 21:58 --- Subject: Bug 43668 Author: hjl Date: Wed Apr 7 21:58:27 2010 New Revision: 158093 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158093 Log: Align stack to 16byte for FP register save area. gcc/ 2010-04-07 H.J. Lu hongjiu...@intel.com PR target/43668 * config/i386/i386.c (setup_incoming_varargs_64): Align stack to 16byte for FP register save area. gcc/testsuite/ 2010-04-07 H.J. Lu hongjiu...@intel.com PR target/43668 * gcc.target/i386/pr43668.c: New. Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config/i386/i386.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43668
[Bug c/43679] ice in gen_lsm_tmp_name, at tree-ssa-loop-im.c:1812
--- Comment #1 from hjl dot tools at gmail dot com 2010-04-07 22:04 --- It is caused by revision 148718: http://gcc.gnu.org/ml/gcc-cvs/2009-06/msg00701.html -- hjl dot tools at gmail dot com changed: What|Removed |Added CC||rguenth at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-04-07 22:04:29 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43679
[Bug c++/43016] [C++0x] Inappropriate multiple definition error for lambda function when inside inline functions
--- Comment #6 from jason at gcc dot gnu dot org 2010-04-07 22:16 --- Subject: Bug 43016 Author: jason Date: Wed Apr 7 22:16:15 2010 New Revision: 158095 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158095 Log: PR c++/43016 * decl.c (start_preparsed_function): Do defer nested functions. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43016
[Bug c++/43680] G++ is too aggressive in optimizing away bounds checking with enums
--- Comment #1 from bangerth at gmail dot com 2010-04-07 23:16 --- (In reply to comment #0) I think the C++ standard can definitely be read to allow this optimization I would most definitely think so. 7.2/6 specifically says that the values an enum variable can take on are, in your example, 0...3. See, in particular, footnote 81 in C++98. Everything outside would invoke undefined behavior, and I like that the compiler can make inferences from that. Don't we already have a warning that warns about assigning values outside the range of an enum? W. -- bangerth at gmail dot com changed: What|Removed |Added CC||manu at gcc dot gnu dot org, ||bangerth at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
[Bug bootstrap/43681] New: bootstrap fails with unused var message for an apparently used var.
158099. cc1: warnings being treated as errors /GCC/gcc-live-trunk/gcc/expr.c: In function âblock_move_libcall_safe_for_call_parmâ: /GCC/gcc-live-trunk/gcc/expr.c:1254:8: error: variable âfnâ set but not used make[3]: *** [expr.o] Error 1 BUT: == static bool block_move_libcall_safe_for_call_parm (void) { #if defined (REG_PARM_STACK_SPACE) 1254== tree fn; #endif /* If arguments are pushed on the stack, then they're safe. */ if (PUSH_ARGS) return true; /* If registers go on the stack anyway, any argument is sure to clobber an outgoing argument. */ #if defined (REG_PARM_STACK_SPACE) fn = emit_block_move_libcall_fn (false); if (OUTGOING_REG_PARM_STACK_SPACE ((!fn ? NULL_TREE : TREE_TYPE (fn))) REG_PARM_STACK_SPACE (fn) != 0) return false; #endif /* If any argument goes in memory, then it might clobber an outgoing -- Summary: bootstrap fails with unused var message for an apparently used var. Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: iains at gcc dot gnu dot org GCC target triplet: powerpc-apple-darwin9 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43681
[Bug rtl-optimization/42863] [4.5/4.6 Regression] with auto increments
--- Comment #4 from hp at gcc dot gnu dot org 2010-04-07 23:50 --- FWIW, I see similar useless register moves for cris-elf (also an autoincrement port with cc0) on trunk r158090 and 4.5-branch r158099, that aren't there on the 4.4 branch r158082 (with no changes that matter in r158096). JFTR, the cc0-clobbering ones are moved by the delayed-branch pass, but that doesn't matter to m68k. :) -- hp at gcc dot gnu dot org changed: What|Removed |Added CC||hp at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42863
[Bug tree-optimization/43655] [4.5/4.6 Regression] -ftree-ter causes FAIL: g++.old-deja/g++.law/temps5.C execution test
--- Comment #4 from zsojka at seznam dot cz 2010-04-08 00:52 --- -ftree-ter also causes (check was interrupted after a while): FAIL: gfortran.dg/append_1.f90 -O0 execution test FAIL: gfortran.dg/backspace_1.f -O0 execution test FAIL: gfortran.dg/backspace_7.f90 -O0 execution test FAIL: gfortran.dg/char_pack_1.f90 -O0 execution test FAIL: gfortran.dg/char_pack_2.f90 -O0 execution test FAIL: gfortran.dg/char_unpack_1.f90 -O0 execution test FAIL: gfortran.dg/char_unpack_2.f90 -O0 execution test According to documentation, -ftree-ter is enabled by -O1 and above. Does it mean it works fine when it is enabled implicitly? (because of other optimization enabled by -O1?) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43655
[Bug boehm-gc/43682] New: libgcj don't support Win x64?
in /boehm-gc/mark.c, line 428-434: context-Esp = context-Ebp; context-Ebp = *((DWORD *)context-Esp); context-Esp = context-Esp - 8; context-Eip = (DWORD )(xer-alt_path); So much x86-oriented register (E** but no R** for _WIN64), does it mean libgcj (because of its default gc's fault or both) had not been ported to Win x64? In addition, a small bug: in /boehm-gc/gc.h, line 87-89: should explicitly add #include basetsd.h since no windows.h can be found above, and the second GC_word should be changed to GC_signed_word Thx. -- Summary: libgcj don't support Win x64? Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: boehm-gc AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: aflyhorse at foxmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43682
[Bug libstdc++/35353] C++ wide character locale doesn't work
--- Comment #15 from luca dot barbieri at gmail dot com 2010-04-08 02:33 --- Why can't wcout simply convert to the selected encoding, and append the results to the cout buffer, as if the converted string had been directly output to cout? I'm not sure about the implementation details, but I fail to see how anything could prevent adopting this rather obvious solution. Of course, if cout is in the middle of the byte sequence of a character, this will not result in sensible output, but that is user error and I fail to see how such use could be made meaningful. BTW, doesn't cout share the stdout buffer via the GNU libio FILE/iostream sharing mechanism, making sync_with_stdio do nothing anyway? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35353
[Bug c++/43680] G++ is too aggressive in optimizing away bounds checking with enums
--- Comment #2 from jason at gcc dot gnu dot org 2010-04-08 02:58 --- Except that the conversion is defined to produce an unspecified value, not undefined behavior. A strict reading of that suggests to me that the compiler is supposed to truncate on conversion so the resulting value is one of the values of the enumeration, but that's certainly not what we want. I also raised this issue as http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1022 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
[Bug c++/43680] G++ is too aggressive in optimizing away bounds checking with enums
--- Comment #3 from bangerth at math dot tamu dot edu 2010-04-08 03:18 --- Subject: Re: G++ is too aggressive in optimizing away bounds checking with enums Except that the conversion is defined to produce an unspecified value, not undefined behavior. A strict reading of that suggests to me that the compiler is supposed to truncate on conversion so the resulting value is one of the values of the enumeration, but that's certainly not what we want. I'm really not in a position to argue standardese with you, but my reading based on the paragraph I cited is that the enumeration has a certain range of values it can represent (which may be larger than the set of values in the enumeration). In my interpretation, any assignment of values outside the range must necessarily produce (unspecified) values within this range. I can see no reason to prohibit a compiler from applying a mask every time. W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680
[Bug c++/43680] G++ is too aggressive in optimizing away bounds checking with enums
--- Comment #4 from jason at gcc dot gnu dot org 2010-04-08 05:19 --- Yes, that's my interpretation as well. But it's not what we do now, and requiring a mask on conversion seems like it would hurt performance more than just doing the comparison. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43680