[Bug middle-end/33589] [4.3 regression] ICE on valid code at -O2: verify_flow_info failed
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-10-23 06:09 --- This is most likely just a latent bug that showed up wth Ollie's patch, looking into it further. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33589
[Bug fortran/33254] Diagnose different string lengths in array constructors at run time
--- Comment #17 from pault at gcc dot gnu dot org 2007-10-23 06:19 --- (In reply to comment #11) I'm adding Paul to the CC list, as perhaps he immediately knows what's happening (Paul, see comment #5). Otherwise I will investigate tomorrow evening or Saturday. I'm pretty permanently on the road, at the moment, so I missed this. I'll try to take a look-see tonight, although I am trying to concentrate on getting the various FORALL bugs sorted. Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33254
[Bug middle-end/33589] [4.3 regression] ICE on valid code at -O2: verify_flow_info failed
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-10-23 06:38 --- So when out of SSA (TER) combines: iftmp.1D.2042_25 = (derivedD.2000:: *) somemethodD.1996; # SMT.36D.2106_36 = VDEF SMT.36D.2106_34(D) { SMT.36D.2106 } iftmp.1_25 (0B); It does not change the case where it knows it cannot throw now. Looking into fixing out of SSA. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33589
[Bug middle-end/33589] [4.3 regression] ICE on valid code at -O2: verify_flow_info failed
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-10-23 06:53 --- Here is a semi undefined case which shows the same issue: void f(void*) throw(); void somefunction() { try { void (*g)(void*) = (void (*)(void*))f; void (*g2)(int*) = (void (*)(int*))g; g2(0); } catch (...) {throw;} } --- CUT - Janis could you do a regression hunt on this bug with the new testcase? -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||janis at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33589
[Bug tree-optimization/33319] [4.2/4.3 regression] g++.dg/tree-ssa/pr27549.C ICE with vectorization
--- Comment #5 from victork at gcc dot gnu dot org 2007-10-23 06:53 --- Created an attachment (id=14394) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14394action=view) vectorizer dump -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33319
[Bug tree-optimization/33319] [4.2/4.3 regression] g++.dg/tree-ssa/pr27549.C ICE with vectorization
--- Comment #6 from victork at gcc dot gnu dot org 2007-10-23 06:57 --- I think this bug is duplicate of pr31081. Probably versioning which is done by vectorizer exposes the problem in inliner. I've attached the vectorizer dump for analysys (pr27549.C.103t.vect) % gdb --args ./gcc/cc1plus -O2 -ftree-vectorize -msse2 ../pr27549.C GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i586-suse-linux...Using host libthread_db library /lib/libthread_db.so.1. (gdb) b fail_abnormal_edge_coalesce Breakpoint 1 at 0x8555f01: file ../../gcc/gcc/tree-ssa-coalesce.c, line 945. (gdb) run Starting program: /home/victork/mainline/build.129573/gcc/cc1plus -O2 -ftree-vectorize -msse2 ../t.C virtual E::~E() E::~E() virtual E::~E() virtual E::~E() virtual F::~F() F::~F() virtual F::~F() virtual F::~F() virtual size_t F::e() const virtual void F::f(char*) const S::S() S::S() S::S() void S::s(const char*, size_t) void S::s(const E*) const char* S::t() void S::v(size_t) S::~S() S::~S() S::~S() const char* foo() void __static_initialization_and_destruction_0(int, int) F::F() E::E() E::E() E::E() F::F() F::F() void _GLOBAL__I_p() Analyzing compilation unit Performing interprocedural optimizations visibility early_local_cleanups inline static-var pure-constAssembling functions: virtual E::~E() virtual F::~F() virtual size_t F::e() const virtual void F::f(char*) const (static initializers for ../t.C) virtual F::~F() virtual E::~E() const char* foo() Breakpoint 1, fail_abnormal_edge_coalesce (x=141, y=138) at ../../gcc/gcc/tree-ssa-coalesce.c:945 945 fprintf (stderr, \nUnable to coalesce ssa_names %d and %d,x, y); (gdb) bt #0 fail_abnormal_edge_coalesce (x=141, y=138) at ../../gcc/gcc/tree-ssa-coalesce.c:945 #1 0x08555c4a in coalesce_partitions (map=0x8b02e90, graph=0x8ac45a0, cl=0x8ac4880, debug=0x0) at ../../gcc/gcc/tree-ssa-coalesce.c:1278 #2 0x08556bf9 in coalesce_ssa_name () at ../../gcc/gcc/tree-ssa-coalesce.c:1380 #3 0x084fd0f1 in remove_ssa_form (perform_ter=141 '\215') at ../../gcc/gcc/tree-outof-ssa.c:1139 #4 0x084fef5f in rewrite_out_of_ssa () at ../../gcc/gcc/tree-outof-ssa.c:1294 #5 0x0840b68a in execute_one_pass (pass=0x89d6e00) at ../../gcc/gcc/passes.c:1117 #6 0x0840b87f in execute_pass_list (pass=0x89d6e00) at ../../gcc/gcc/passes.c:1170 #7 0x0840b892 in execute_pass_list (pass=0x89d6c00) at ../../gcc/gcc/passes.c:1171 #8 0x084f8c77 in tree_rest_of_compilation (fndecl=0xb7d94a00) at ../../gcc/gcc/tree-optimize.c:404 #9 0x08695245 in cgraph_expand_function (node=0xb7d94c00) at ../../gcc/gcc/cgraphunit.c:1060 #10 0x08697947 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1123 #11 0x08108e5d in cp_write_global_declarations () at ../../gcc/gcc/cp/decl2.c:3410 #12 0x084948c9 in toplev_main (argc=5, argv=0xbfea1f24) at ../../gcc/gcc/toplev.c:1055 #13 0x0821fc5f in main (argc=Cannot access memory at address 0x12 ) at ../../gcc/gcc/main.c:35 (gdb) Continuing. Unable to coalesce ssa_names 141 and 138 which are marked as MUST COALESCE. s$b_141(ab) and s$b_138(ab) ../t.C: In function 'const char* foo()': ../t.C:72: internal compiler error: SSA corruption Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. Program exited with code 04. -- victork at gcc dot gnu dot org changed: What|Removed |Added CC||jakub at gcc dot gnu dot ||org, rakdver at gcc dot gnu ||dot org, amacleod at redhat ||dot com, jh at suse dot cz Status|ASSIGNED|WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33319
[Bug tree-optimization/33319] [4.2/4.3 regression] g++.dg/tree-ssa/pr27549.C ICE with vectorization
--- Comment #7 from pinskia at gcc dot gnu dot org 2007-10-23 07:02 --- Actually I doubt it is related to the other bug as the other one only happens on the trunk as there is no SSA inliner in 4.2 so changing back to NEW. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |NEW Last reconfirmed|2007-10-09 06:52:04 |2007-10-23 07:02:54 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33319
[Bug fortran/33749] Wrong evaluation of expressions in lhs of assignment statements
--- Comment #7 from burnus at gcc dot gnu dot org 2007-10-23 08:20 --- (In reply to comment #6) URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129539 Log: 2007-10-21 Paul Thomas [EMAIL PROTECTED] PR fortran/33749 Paul, can this bug be closed as FIXED or is something left to be fixed? Or should be backported to 4.2? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33749
[Bug tree-optimization/33866] New: [4.3 Regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937
(sid)30431:[EMAIL PROTECTED]: ~] /usr/lib/gcc-snapshot/bin/gcc -c -O1 -ftree-vectorize hdf5-tselect.c hdf5-tselect.c: In function 'test_select_fill_hyper_simple': hdf5-tselect.c:12: internal compiler error: in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937 Please submit a full bug report, with preprocessed source if appropriate. I see this with current trunk but it goes back several month. 20070303 works but 20070326 shows the ICE. -- Summary: [4.3 Regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33866
[Bug tree-optimization/33866] [4.3 Regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937
--- Comment #1 from tbm at cyrius dot com 2007-10-23 08:28 --- Created an attachment (id=14395) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14395action=view) preprocessed source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33866
[Bug tree-optimization/33866] [4.3 Regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937
--- Comment #2 from tbm at cyrius dot com 2007-10-23 08:29 --- /* Testcase by Martin Michlmayr [EMAIL PROTECTED] */ typedef struct { long *coords; } fill_iter_info; extern H5Diterate (fill_iter_info *); void test_select_fill_hyper_simple (long *offset) { long start[2]; int num_points; long points[16][2]; fill_iter_info iter_info; int i, j; iter_info.coords = (long *) points; for (i = 0, num_points = 0; j (int) start[1]; j++, num_points++) { points[num_points][0] = i + start[0]; points[num_points][1] = j + start[1]; } H5Diterate (iter_info); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33866
[Bug tree-optimization/33866] [4.3 Regression] ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-transform.c:1937
--- Comment #3 from tbm at cyrius dot com 2007-10-23 08:29 --- Breakpoint 1, fancy_abort (file=0xc4e238 gcc/tree-vect-transform.c, line=1937, function=0xc4f890 vect_get_vec_def_for_stmt_copy) at gcc/diagnostic.c:659 659 { (gdb) where #0 fancy_abort (file=0xc4e238 gcc/tree-vect-transform.c, line=1937, function=0xc4f890 vect_get_vec_def_for_stmt_copy) at gcc/diagnostic.c:659 #1 0x00aa0af7 in vect_get_vec_def_for_stmt_copy (dt=value optimized out, vec_oprnd=value optimized out) at gcc/tree-vect-transform.c:1937 #2 0x00aa5a02 in vectorizable_store (stmt=0x2b26bc554c30, bsi=0x7fffef07b860, vec_stmt=0x7fffef07b768, slp_node=0x0) at gcc/tree-vect-transform.c:4833 #3 0x00ab2e77 in vect_transform_stmt (stmt=0x2b26bc554c30, bsi=0x7fffef07b860, strided_store=0x7fffef07b89f , slp_node=0x0) at gcc/tree-vect-transform.c:6145 #4 0x00ab3d42 in vect_transform_loop (loop_vinfo=0xfee120) at gcc/tree-vect-transform.c:7388 #5 0x0080be1b in vectorize_loops () at gcc/tree-vectorizer.c:2507 #6 0x0063f247 in execute_one_pass (pass=0xee2d00) at gcc/passes.c:1117 #7 0x0063f40c in execute_pass_list (pass=0xee2d00) at gcc/passes.c:1170 #8 0x0063f41e in execute_pass_list (pass=0xee2b20) at gcc/passes.c:1171 #9 0x0063f41e in execute_pass_list (pass=0xee1f20) at gcc/passes.c:1171 #10 0x00717e0e in tree_rest_of_compilation (fndecl=0x2b26bc53e900) at gcc/tree-optimize.c:404 #11 0x0089adb2 in cgraph_expand_function (node=0x2b26bc53ea00) at gcc/cgraphunit.c:1060 #12 0x0089c858 in cgraph_optimize () at gcc/cgraphunit.c:1123 #13 0x00414d9e in c_write_global_declarations () at gcc/c-decl.c:8077 #14 0x006bb0b7 in toplev_main (argc=value optimized out, argv=value optimized out) at gcc/toplev.c:1055 #15 0x2b26bc0e7b44 in __libc_start_main () from /lib/libc.so.6 #16 0x004043f9 in _start () (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33866
[Bug tree-optimization/33867] New: [4.3 Regression] ICE verify_flow_info failed (Wrong frequency of block)
(sid)30567:[EMAIL PROTECTED]: ~] /usr/lib/gcc-snapshot/bin/gcc -c -O crystalspace-polyclip.cc crystalspace-polyclip.cc: In member function 'virtual void csBoxClipper::Clip()': crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong frequency of block 7 -1247 crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong frequency of block 6 -2248 crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong probability of edge 5-5 12499 crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong probability of edge 5-6 -2499 crystalspace-polyclip.cc:51: internal compiler error: verify_flow_info failed Please submit a full bug report, I noticed this with current trunk but I can reproduce it with all 4.3 snapshots I have - this goes back to 20070303. I don't have anything older. It doesn't happen with gcc-4.2. -- Summary: [4.3 Regression] ICE verify_flow_info failed (Wrong frequency of block) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33867
[Bug tree-optimization/33867] [4.3 Regression] ICE verify_flow_info failed (Wrong frequency of block)
--- Comment #1 from tbm at cyrius dot com 2007-10-23 08:54 --- Created an attachment (id=14396) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14396action=view) preprocessed source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33867
[Bug bootstrap/33608] [4.3 Regression] Bootstrap with ada fails linking gnatbind with 4.3 host compiler
--- Comment #4 from rguenth at gcc dot gnu dot org 2007-10-23 08:55 --- Fixed. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33608
[Bug tree-optimization/33867] [4.3 Regression] ICE verify_flow_info failed (Wrong frequency of block)
--- Comment #2 from tbm at cyrius dot com 2007-10-23 08:55 --- /* Testcase by Martin Michlmayr [EMAIL PROTECTED] */ extern void *memcpy (void *, __const void *, long unsigned int); class csVector2 { public:float x; }; class csBox2 { }; class csBoxClipper { csBox2 region; virtual void Clip (void); }; struct StatusOutputNone { }; namespace CS { template typename BoxTest, typename StatusOutput class BoxClipper { BoxTest boxTest; StatusOutput statOut; const csBox2 region; csVector2 *InP; long unsigned int InV; csVector2 *OutP; long unsigned int OutV; public: BoxClipper (const BoxTest boxTest, const StatusOutput statOut, const csBox2 region): boxTest (boxTest), statOut (statOut), region (region), OutV (-1) { } void Clip () { memcpy (this-OutP, InP, OutV * sizeof (csVector2)); } }; } struct BoxTestAll { }; void csBoxClipper::Clip (void) { BoxTestAll b; StatusOutputNone n; CS::BoxClipper BoxTestAll, StatusOutputNone boxClip (b, n, region); boxClip.Clip (); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33867
[Bug bootstrap/33608] [4.3 Regression] Bootstrap with ada fails linking gnatbind with 4.3 host compiler
--- Comment #5 from rguenth at gcc dot gnu dot org 2007-10-23 08:55 --- Subject: Bug 33608 Author: rguenth Date: Tue Oct 23 08:54:56 2007 New Revision: 129576 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129576 Log: 2007-10-23 Richard Guenther [EMAIL PROTECTED] PR bootstrap/33608 * tracebak.c: #undef abort after including system.h. Modified: trunk/gcc/ada/ChangeLog trunk/gcc/ada/tracebak.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33608
[Bug tree-optimization/33867] [4.3 Regression] ICE verify_flow_info failed (Wrong frequency of block)
--- Comment #3 from tbm at cyrius dot com 2007-10-23 08:56 --- Performing interprocedural optimizations visibility early_local_cleanups inline static-var pure-constAssembling functions: virtual void csBoxClipper::Clip() /home/tbm/crystalspace-polyclip.cc: In member function âvirtual void csBoxClipper::Clip()â: /home/tbm/crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong frequency of block 7 -1247 /home/tbm/crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong frequency of block 6 -2248 /home/tbm/crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong probability of edge 5-5 12499 /home/tbm/crystalspace-polyclip.cc:51: error: verify_flow_info: Wrong probability of edge 5-6 -2499 Breakpoint 2, internal_error (gmsgid=0xc4c857 verify_flow_info failed) at gcc/diagnostic.c:600 600 { (gdb) where #0 internal_error (gmsgid=0xc4c857 verify_flow_info failed) at gcc/diagnostic.c:600 #1 0x005f4799 in verify_flow_info () at gcc/cfghooks.c:246 #2 0x00b379ba in tree_expand_cfg () at gcc/cfgexpand.c:1943 #3 0x00765847 in execute_one_pass (pass=0x101ebe0) at gcc/passes.c:1117 #4 0x00765a0c in execute_pass_list (pass=0x101ebe0) at gcc/passes.c:1170 #5 0x00840c1e in tree_rest_of_compilation (fndecl=0x2b226f7cba00) at gcc/tree-optimize.c:404 #6 0x009c3bc2 in cgraph_expand_function (node=0x2b226f7e3900) at gcc/cgraphunit.c:1060 #7 0x009c5668 in cgraph_optimize () at gcc/cgraphunit.c:1123 #8 0x004ac2cf in cp_write_global_declarations () at gcc/cp/decl2.c:3410 #9 0x007e3ec7 in toplev_main (argc=value optimized out, argv=value optimized out) at gcc/toplev.c:1055 #10 0x2b226f327b44 in __libc_start_main () from /lib/libc.so.6 #11 0x004043f9 in _start () (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33867
[Bug target/33848] [4.2 Regression] reference to non-existent label at -O1 on mips/mipsel
--- Comment #9 from tbm at cyrius dot com 2007-10-23 09:06 --- (In reply to comment #8) Can you try the patch that is in PR 33755 ? Richard, can you do this? Since you wrote that patch I'm sure you have a GCC with it applied (whereas I don't at the moment). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33848
[Bug c++/33865] [4.3 Regression] ICE: canonical types differ for identical types const
--- Comment #4 from tbm at cyrius dot com 2007-10-23 09:36 --- (In reply to comment #3) (In reply to comment #2) Dup of PR33620? This is more likely because of he attributes here. Yeah, it's related to the attribute. However, it seems Steven is right. The bug no longer shows up with 20071023-r129576 (the current trunk I used to report this bug was before PR33620 got fixed.) *** This bug has been marked as a duplicate of 33620 *** -- tbm at cyrius dot com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33865
[Bug c++/33620] [4.3 regression] internal compiler error: canonical types differ for identical types const QListQStringList and const QListQStringList
--- Comment #7 from tbm at cyrius dot com 2007-10-23 09:36 --- *** Bug 33865 has been marked as a duplicate of this bug. *** -- tbm at cyrius dot com changed: What|Removed |Added CC||tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33620
[Bug debug/33868] New: [4.3 Regression] Gross memory usage of var-tracking
The glibc testsuite runs into a var-tracking issue where we consume loads of memory (2GB) to compile test-tgmath2.i. Probably related to PR31412. ./cc1 -O -o /dev/null test-tgmath2.i -std=gnu99 -fgnu89-inline -fmerge-all-constants -fno-builtin -g -- Summary: [4.3 Regression] Gross memory usage of var-tracking Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: memory-hog Severity: normal Priority: P3 Component: debug AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org BugsThisDependsOn: 31412 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33868
[Bug debug/33868] [4.3 Regression] Gross memory usage of var-tracking
--- Comment #1 from rguenth at gcc dot gnu dot org 2007-10-23 09:57 --- Created an attachment (id=14397) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14397action=view) testcase (unreduced) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33868
[Bug debug/33868] [4.3 Regression] Gross memory usage of var-tracking
--- Comment #2 from rguenth at gcc dot gnu dot org 2007-10-23 10:05 --- We don't finish vt_find_locations () and have loads of variables allocated: 750 new_var = pool_alloc (var_pool); (gdb) print *var_pool $3 = {name = 0xf3d05a variable_def pool, id = 22681, elts_per_block = 64, returned_free_list = 0x0, virgin_free_list = 0x775c11d8 , virgin_elts_remaining = 40, elts_allocated = 3427264, elts_free = 40, blocks_allocated = 53551, block_list = 0x775bead0, block_size = 26632, elt_size = 416} (gdb) print *loc_chain_pool $9 = {name = 0xf3d06c location_chain_def pool, id = 22682, elts_per_block = 1024, returned_free_list = 0x0, virgin_free_list = 0x7762ed48 , virgin_elts_remaining = 803, elts_allocated = 3735552, elts_free = 803, blocks_allocated = 3648, block_list = 0x7762c3d0, block_size = 49160, elt_size = 48} #0 unshare_variable (set=0x875ff48, var=0x7764d148, initialized=VAR_INIT_STATUS_INITIALIZED) at /space/rguenther/src/svn/pointer_plus/gcc/var-tracking.c:750 #1 0x00aeb75b in delete_variable_part (set=0x875ff48, loc=0x2b5761fab440, decl=0x2b57662d1000, offset=0) at /space/rguenther/src/svn/pointer_plus/gcc/var-tracking.c:2592 #2 0x00ae6e47 in var_reg_delete (set=0x875ff48, loc=0x2b576506c9c0, clobber=1 '\001') at /space/rguenther/src/svn/pointer_plus/gcc/var-tracking.c:957 #3 0x00aea150 in compute_bb_dataflow (bb=0x2b57616a7360) at /space/rguenther/src/svn/pointer_plus/gcc/var-tracking.c:2068 #4 0x00aea48c in vt_find_locations () -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33868
[Bug tree-optimization/33869] New: [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
I see the following on IA64. It doesn't fail on x86_64. (sid)[EMAIL PROTECTED]:~$ /usr/lib/gcc-snapshot/bin/g++ -c -O3 mercator-TerrainMod.cc mercator-TerrainMod.cc: In member function 'AxisBox2 ShapeTerrainModShape::bbox() const [with Shape = RotBox2]': mercator-TerrainMod.cc:59: error: missing definition for SSA_NAME: SMT.12_15 in statement: SMT.12_20 = PHI SMT.12_12(D)(4), SMT.12_15(6) PHI argument SMT.12_15 for PHI node SMT.12_20 = PHI SMT.12_12(D)(4), SMT.12_15(6) mercator-TerrainMod.cc:59: internal compiler error: verify_ssa failed Please submit a full bug report, -- Summary: [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #3 from tbm at cyrius dot com 2007-10-23 10:49 --- This didn't ICE doesn't happen with 20070820 but happens now with 20071020. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #2 from tbm at cyrius dot com 2007-10-23 10:47 --- /* Testcase by Martin Michlmayr [EMAIL PROTECTED] */ template const int dim class Point { public: Point () { } void operator= (const Point rhs); private: float m_elem[dim]; }; template const int dim void Point dim ::operator= (const Point dim rhs) { if (this == rhs) for (int i = 0; i dim; ++i) m_elem[i] = rhs.m_elem[i]; } template const int dim class AxisBox { public: AxisBox () { } AxisBox (const Point dim p1, const Point dim p2, bool ordered = false) { setCorners (); } AxisBox (const AxisBox a):m_low (a.m_low), m_high (a.m_high) { } void setCorners (void); private: Point dim m_low, m_high; }; template const int dim class RotBox { public: AxisBox dim boundingBox () const; private: Point dim m_corner0; }; template const int dim AxisBox dim RotBox dim ::boundingBox () const { Point dim min = m_corner0, max = m_corner0; return AxisBox dim (min, max, true); } template const int dim void AxisBox dim ::setCorners (void) { const Point dim p2; m_high = p2; } template typename Shape class ShapeTerrainMod { virtual AxisBox 2 bbox () const; Shape m_shape; }; template typename Shape AxisBox 2 ShapeTerrainMod Shape ::bbox ()const { return m_shape.boundingBox (); } template class ShapeTerrainMod RotBox 2 ; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #1 from tbm at cyrius dot com 2007-10-23 10:47 --- Created an attachment (id=14398) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14398action=view) preprocessed source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #4 from tbm at cyrius dot com 2007-10-23 11:11 --- Also works with 20070902. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #5 from tbm at cyrius dot com 2007-10-23 11:12 --- ... and works with 20070916. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #6 from rguenth at gcc dot gnu dot org 2007-10-23 11:18 --- Does disabling the vectorizer fix it? -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||rguenth at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug tree-optimization/33869] [4.3 Regression] ICE verify_ssa failed (missing definition for SSA_NAME)
--- Comment #7 from tbm at cyrius dot com 2007-10-23 11:32 --- (In reply to comment #6) Does disabling the vectorizer fix it? Yes, that works, and it also fails with -O2 -ftree-vectorize. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33869
[Bug c/33873] New: Bad printf warning for bitfield
Consider this C code: #include stdio.h typedef long long int int64; typedef long long unsigned int uint64; struct pointer { uint64 data : 58; uint64 tag : 6; }; union value { int64 i; struct pointer p; }; typedef union value Value; void test(Value x) { printf(%llu\n, x.p.data); } When I compile it with -Wall, I get foo.c:20: warning: format %llu expects type long long unsigned int, but argument 2 has type long long unsigned int:58 The value is presumably going to be passed to printf as an unsigned long long--what else could it be passed as? So this warning seems incorrect. This may be related to PR 33819. -- Summary: Bad printf warning for bitfield Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ian at airs dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33873
[Bug c/33873] Bad printf warning for bitfield
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-10-23 19:05 --- See PR 21962 on the explanation on why this diagnostic is correct. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33873
[Bug libstdc++/5291] Bad reference to build directory in libstdc++.la
--- Comment #24 from geir at cray dot com 2007-10-23 19:11 --- State-Changed-From-To: open-suspended What is the status of this bug? Will the proposed patches be implemented? (Note: http://gcc.gnu.org/bugzilla/page.cgi?id=fields.html#status does not describe SUSPENDED status). -- geir at cray dot com changed: What|Removed |Added CC||geir at cray dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291
[Bug tree-optimization/33860] [4.3 Regression] ICE in vectorizable_load, at tree-vect-transform.c:5503
--- Comment #5 from dorit at gcc dot gnu dot org 2007-10-23 19:50 --- Subject: Bug 33860 Author: dorit Date: Tue Oct 23 19:50:18 2007 New Revision: 129587 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129587 Log: PR tree-optimization/33860 * tree-vect-transform.c (vect_analyze_data_ref_access): Don't allow interleaved accesses in case the dr is inside the inner-loop during outer-loop vectorization. Added: trunk/gcc/testsuite/g++.dg/vect/pr33860.cc trunk/gcc/testsuite/g++.dg/vect/pr33860a.cc Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-analyze.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33860
[Bug libstdc++/5291] Bad reference to build directory in libstdc++.la
--- Comment #25 from dave at hiauly1 dot hia dot nrc dot ca 2007-10-23 20:11 --- Subject: Re: Bad reference to build directory in libstdc++.la What is the status of this bug? Will the proposed patches be implemented? (Note: http://gcc.gnu.org/bugzilla/page.cgi?id=fields.html#status does not describe SUSPENDED status). Comment #1 appears incorrect given the proposed patches, so I believe the bug should be reopened. The patches need submission to gcc-patches for review. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291
[Bug rtl-optimization/33846] [4.3 Regression] ICE in trunc_int_for_mode, at explow.c:55
--- Comment #6 from uros at gcc dot gnu dot org 2007-10-23 20:15 --- Subject: Bug 33846 Author: uros Date: Tue Oct 23 20:15:04 2007 New Revision: 129589 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129589 Log: PR rtl-optimization/33846 * combine.c (simplify_shift_const_1) [NOT]: Skip vector modes. testsuite/ChangeLog: PR rtl-optimization/33846 * gcc.dg/vect/pr33846.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/vect/pr33846.c Modified: trunk/gcc/ChangeLog trunk/gcc/combine.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33846
[Bug rtl-optimization/33846] [4.3 Regression] ICE in trunc_int_for_mode, at explow.c:55
--- Comment #7 from ubizjak at gmail dot com 2007-10-23 20:16 --- Fixed. -- ubizjak at gmail dot com changed: What|Removed |Added URL||http://gcc.gnu.org/ml/gcc- ||patches/2007- ||10/msg01372.html Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33846
[Bug c++/33874] New: (cygwin/mingw) sjlj exception handling corrupts stack
# On g++-sjlj.exe (GCC) 4.2.1-sjlj (mingw32 sjlj-unwind) # g++ -v Using built-in specs. Target: mingw32 Configured with: ../gcc-4.2.1/configure --with-gcc --enable-libgomp --host=mingw32 --build=mingw32 --target=mingw32 --program-suffix=-sjlj --with-arch=i486 --with-tune=generic --disable-werror --prefix=/mingw --with-local-prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-win32-registry --enable-sjlj-exceptions --enable-libstdcxx-debug --enable-cxx-flags=-fno-function-sections -fno-data-sections --enable-version-specific-runtime-libs --disable-bootstrap Thread model: win32 gcc version 4.2.1-sjlj (mingw32 sjlj-unwind) # And # On g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) // sjlj-EH # g++ -v Configured with: /usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls --without-included-gettext --enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib --enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug Thread model: posix gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) - The test case below shows that Gcc sjlj exception handling corrupts stack and can make the process crash when the stack frame contains VLA(variable length array) or alloca()'ed variables and has no catch handler for the exception being handled. And this is my solution for this bug == http://home.paran.com/darkxun/libcyn/GccBugFix.html I'm not offending you guys. Just wanted to make a prof that it is my own work (not plagiarized). Sorry. problem.cc- #include stdio.h static int __seq = 0; struct Temp { int_i; Temp() : _i(__seq++) { fprintf(stderr,%d\n, _i); } virtual ~Temp() { fprintf(stderr,%d\n, _i); } }; void problem( void(*func)() ) { int N=5; Temp temp[N]; func(); } main.cc void problem( void(*func)() ); void bugger() { throw anything; } int main() { try { problem( bugger ); } catch(...) {} } compilation #using static problem.o g++ -o problem.o problem.cc -c g++ main.cc problem.o #or shared problem.dll g++ -o problem.dll problem.cc -shared g++ main.cc problem.dll -- Summary: (cygwin/mingw) sjlj exception handling corrupts stack Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: darkxun at paran dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33874
[Bug tree-optimization/32921] [4.3 Regression] Revision 126326 causes 12% slowdown
--- Comment #29 from pthaugen at gcc dot gnu dot org 2007-10-23 20:29 --- Found another example on PowerPC in the same benchmark that is not fixed by the checked in patches. Compiled with -m32 -O2. From the loop in procedure FLUXI: revision 126325: .L47: lfd 0,0(9) #* ivtmp.277, tmp346 lfd 13,-8(9) #, tmp347 add 9,9,0# ivtmp.277, ivtmp.277, ivtmp.309 fsub 0,0,13 # tmp345, tmp346, tmp347 fmul 0,0,12 # tmp348, tmp345, dtvol.23 fneg 0,0 # tmp349, tmp348 stfd 0,0(11) #* ivtmp.306, tmp349 add 11,11,10 # ivtmp.306, ivtmp.306, ivtmp.280 bdnz .L47# revision 126326 (and current mainline): .L83: lwz 0,48(7) # variable.stride, variable.stride lfd 0,0(10) #* ivtmp.277, tmp416 lfd 13,-8(10)#, tmp417 lfd 12,0(5) # dtvol, dtvol add 10,10,6 # ivtmp.277, ivtmp.277, ivtmp.306 mullw 0,8,0 # tmp409, l, variable.stride fsub 0,0,13 # tmp415, tmp416, tmp417 lwz 9,4(7) # du.offset, du.offset lwz 11,0(7) # du.data, du.data fmul 0,0,12 # tmp420, tmp415, dtvol fneg 0,0 # tmp422, tmp420 add 0,0,9# tmp412, tmp409, du.offset addi 8,8,1 # l, l, slwi 0,0,3 # tmp413, tmp412, stfdx 0,11,0 #, tmp422 bdnz .L83# -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32921
[Bug tree-optimization/32921] [4.3 Regression] Revision 126326 causes 12% slowdown
--- Comment #30 from pthaugen at gcc dot gnu dot org 2007-10-23 20:30 --- Created an attachment (id=14402) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14402action=view) Testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32921
[Bug c++/33874] (cygwin/mingw) sjlj exception handling corrupts stack
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-10-23 20:48 --- *** This bug has been marked as a duplicate of 19774 *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33874
[Bug middle-end/19774] VLA's vs SjLj EH unwind
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-10-23 20:48 --- *** Bug 33874 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||darkxun at paran dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19774
[Bug tree-optimization/33870] [4.3 Regression] miscompiles sqlite
--- Comment #8 from rguenth at gcc dot gnu dot org 2007-10-23 21:26 --- For the parent variable of the missing VOP SFT.6 there is no SFT with offset zero in pD.1574_36 NMTs aliases. So the following triggers: ! EXECUTE_IF_SET_IN_BITMAP (aliases, 0, i, bi) { ! al = referenced_var (i); ! if (TREE_CODE (al) == STRUCT_FIELD_TAG) { ! gcc_assert (SFT_OFFSET (get_subvars_for_var (SFT_PARENT_VAR (al))-var) == 0); ! gcc_assert (bitmap_bit_p (aliases, DECL_UID (get_subvars_for_var (SFT_PARENT_VAR (al))-var))); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33870
[Bug tree-optimization/33870] [4.3 Regression] miscompiles sqlite
--- Comment #9 from rguenth at gcc dot gnu dot org 2007-10-23 21:27 --- Created an attachment (id=14403) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14403action=view) full checking patch -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33870
[Bug tree-optimization/33870] [4.3 Regression] miscompiles sqlite
--- Comment #10 from rguenth at gcc dot gnu dot org 2007-10-23 21:28 --- And sadly the following doesn't help. Index: tree-ssa-structalias.c === --- tree-ssa-structalias.c (revision 129582) +++ tree-ssa-structalias.c (working copy) @@ -4738,7 +4738,8 @@ set_uids_in_ptset (tree ptr, bitmap into var_alias_set = get_alias_set (sft); if (no_tbaa_pruning || (!is_derefed !vi-directly_dereferenced) - || alias_sets_conflict_p (ptr_alias_set, var_alias_set)) + || alias_sets_conflict_p (ptr_alias_set, var_alias_set) + || vi-offset == 0) bitmap_set_bit (into, DECL_UID (sft)); } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33870
[Bug tree-optimization/33870] [4.3 Regression] miscompiles sqlite
--- Comment #11 from rguenth at gcc dot gnu dot org 2007-10-23 21:52 --- Now it is memory paritioning again ;) static void rewrite_alias_set_for (tree tag, bitmap new_aliases) { bitmap_iterator bi; unsigned i; tree mpt, sym; EXECUTE_IF_SET_IN_BITMAP (MTAG_ALIASES (tag), 0, i, bi) { sym = referenced_var (i); mpt = memory_partition (sym); if (mpt) bitmap_set_bit (new_aliases, DECL_UID (mpt)); else bitmap_set_bit (new_aliases, DECL_UID (sym)); } /* Rebuild the may-alias array for TAG. */ bitmap_copy (MTAG_ALIASES (tag), new_aliases); } This happily separates the zero-offset SFT from the other SFTs, keeping some in the NMT and puts some other in the MPT. So, what's the fix? Never divorce SFTs of a single variable to different (or no) partitions? Duplicate the zero-offset SFT in both the MPT and the NMT? Install the fix to not assume the zero-offset SFT is in the set of aliases? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33870
[Bug fortran/33849] Fix misleading error message GENERIC non-INTRINSIC procedure not allowed as an actual argument
--- Comment #7 from burnus at gcc dot gnu dot org 2007-10-23 21:57 --- (In reply to comment #6) The test case generic_actual_arg.f90 fails because the dg-error has not been adjusted: /opt/gcc/_gcc-clean/gcc/testsuite/gfortran.dg/generic_actual_arg.f90:21.7: CALL F(CALCULATION) ! { dg-error GENERIC non-INTRINSIC procedure } 1 Error: GENERIC procedure 'calculation' is not allowed as an actual argument at (1) Regression testing sometimes helps ;-) I will fix this unless Jerry beats me. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33849
[Bug c/33598] gcc 4.2.1 ignores GNU ld on Solaris 9
--- Comment #16 from dhaliK at jla dot rutgers dot edu 2007-10-23 22:07 --- Ok, so I'm back on the track of what's going on here. I built it with multilib as you said, and it builds 32/64 fine on Solaris, but when it goes to link internally it chokes on the 64-bitness. In other words, gcc looks like it requires gnu ld in order to build 64bit on Solaris and that was why we had been building two flavors of it. One built with gnu ld and one with sun ld. This is what happens: gcc -v -o /usr/local/src/rpm-packages/BUILD/otp_src_R11B-5/bin/sparc-sun-solaris2.9/beam -L/usr/local/lib/sparcv9 -L/usr/local/ssl/lib/sparcv9 -R/usr/local/lib/sparcv9 -R/usr/local/ssl/lib/sparcv9 /usr/local/src/rpm-packages/BUILD/otp_src_R11B-5/erts/emulator/obj/sparc-sun-solaris2.9/opt/plain/erl_main.o Using built-in specs. Target: sparc-sun-solaris2.9 Configured with: ../gcc-4.2.2/configure --enable-shared --enable-threads --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --disable-libgcj --disable-libffi --disable-libjava --disable-nls Thread model: posix gcc version 4.2.2 /usr/local/libexec/gcc/sparc-sun-solaris2.9/4.2.2/collect2 -V -R/usr/local/lib/sparcv9 -R/usr/local/ssl/lib/sparcv9 -Y P,/usr/ccs/lib:/usr/lib -Qy -o /usr/local/src/rpm-packages/BUILD/otp_src_R11B-5/bin/sparc-sun-solaris2.9/beam /usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2/crt1.o /usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2/crti.o /usr/ccs/lib/values-Xa.o /usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2/crtbegin.o -L/usr/local/lib/sparcv9 -L/usr/local/ssl/lib/sparcv9 -L/usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2 -L/usr/ccs/lib -L/usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2/../../.. /usr/local/src/rpm-packages/BUILD/otp_src_R11B-5/erts/emulator/obj/sparc-sun-solaris2.9/opt/plain/erl_main.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc /usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2/crtend.o /usr/local/lib/gcc/sparc-sun-solaris2.9/4.2.2/crtn.o ld: Software Generation Utilities - Solaris Link Editors: 5.9-1.390 ld: fatal: file /usr/local/src/rpm-packages/BUILD/otp_src_R11B-5/erts/emulator/obj/sparc-sun-solaris2.9/opt/plain/erl_main.o: wrong ELF class: ELFCLASS64 ld: fatal: File processing errors. No output written to /usr/local/src/rpm-packages/BUILD/otp_src_R11B-5/bin/sparc-sun-solaris2.9/beam You get an ELFCLASS error everytime it links with 64bit. The sun ld that gcc was configured with thinks its being handed a 32bit file by default and chokes on 64bit. I'm assuming gcc has no way of telling it to expect 64bit and thats where it dies. The file I'm showing above had been build with gcc -mcpu=v9 -m64, so it should pass that along, but it doesn't. I'm guess I'm going to have to have two flavors of gcc after all. 64bit with gnu ld and 32bit with sun ld. Is there any chance of getting around this? I tried LD=/usr/local/gnu/bin/ld but it ignore it. -- dhaliK at jla dot rutgers dot edu changed: What|Removed |Added Status|WAITING |UNCONFIRMED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33598
[Bug tree-optimization/33875] New: Small performance improvement
When local-pure_const_state in ipa-pure-const.c/check_decl has been set to IPA_NEITHER, it cannot be modified in the rest of the function, so it is possible to return immediately. This should bring a tiny performance improvement while not impairing the code readability. Patch follows, against SVN tree. -- Summary: Small performance improvement Product: gcc Version: unknown Status: UNCONFIRMED Severity: trivial Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sam at rfc1149 dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33875
[Bug tree-optimization/33875] Small performance improvement
--- Comment #1 from sam at rfc1149 dot net 2007-10-23 22:24 --- Created an attachment (id=14404) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14404action=view) Small performance improvement -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33875
[Bug c++/33876] New: in-class initialization of const static data members and template functions
const static data members of an integral type, which are initialized in the class declaration can not be used in templated functions if these functions take references as arguments. The linker reports an undefined reference to that member. The problem occured e.g. with std::min() and std:max() from algorithm. The code below reproduces the error. snip -- bug.c: -- template class T const T min(const T a, const T b) { return (a b ? a : b); } template class T inline const T max(const T a, const T b) { return (a b ? a : b); } template class T inline const T mux(const T a, const T b) { return (a b ? a : b); } class A { public: static const int x = 1; // in-class init static const int y; }; const int A::y = 1; // out of class init int main(int argc, char **argv) { int i = 2; int j = min(i, A::x); // undefined reference with and without -O int k = max(i, A::x); // OK with -O, undefined reference without -O int l = mux(i, A::x); // OK with and without -O int m = min(i, A::y); // OK with and without -O int n = max(i, A::y); // OK with and without -O int o = mux(i, A::y); // OK with and without -O } --- snip This is the output when compiling without and with optimization -O. Note that the error goes away for the inlined template method when turning optimization on. Note also that the static const member which is initialized outside of the class declaration never poses a problem. snip g++ bug.c /tmp/cc6W3wcw.o: In function `main': bug.c:(.text+0x1c): undefined reference to `A::x' bug.c:(.text+0x34): undefined reference to `A::x' collect2: ld returned 1 exit status g++ bug.c -O /tmp/ccCaNIHE.o: In function `main': bug.c:(.text+0x21): undefined reference to `A::x' collect2: ld returned 1 exit status snip This is the output of gcc -v snip gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.2 20070626 (Red Hat 4.1.2-13) snip The machine is an Intel Core Duo T2600 running Fedora Core 6. -- Summary: in-class initialization of const static data members and template functions Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: michael dot zillich at gmx dot net GCC build triplet: gcc version 4.1.2 20070626 (Red Hat 4.1.2-13) GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33876
[Bug c++/33876] in-class initialization of const static data members and template functions
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-10-23 23:20 --- And this is correct behavior. The C++ standard says they have to be declared still, you just have a definition. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID Summary|in-class initialization of |in-class initialization of |const static data members |const static data members |and template functions |and template functions |result in udefined | |references | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33876
[Bug c++/33876] in-class initialization of const static data members and template functions
--- Comment #2 from michael dot zillich at gmx dot net 2007-10-23 23:43 --- (In reply to comment #1) And this is correct behavior. The C++ standard says they have to be declared still, you just have a definition. Ok, got You. But then why the different bahaviour for a) optimization turned on/off b) if the arguments are not passed with references (the function mux() in my example) I suspect that if I do not actually define it, the compiler will just substitute any occurcnce of say A::x with the literal value 1. And of course this fails as soon as I need a reference to A::x In any case I would expect an undefined reference reported in all cases. Or a warning, at least with -Wall. As it is now the compiler behaviour is a bit unclear, not complaining in one case, correctly reporting error in the other case. Personally I am all for strict adherence to standards. (Thanks for the lightning-fast answer by the way! :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33876
[Bug c++/33876] in-class initialization of const static data members and template functions
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-10-24 00:29 --- Subject: Re: in-class initialization of const static data members and template functions But then why the different bahaviour for Because the standard does not require a diagnostic for this invalid code. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33876
[Bug fortran/33849] Fix misleading error message GENERIC non-INTRINSIC procedure not allowed as an actual argument
--- Comment #8 from jvdelisle at gcc dot gnu dot org 2007-10-24 03:29 --- Yes, regression tests help, I forgot to fix the testcase -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33849
[Bug fortran/33849] Fix misleading error message GENERIC non-INTRINSIC procedure not allowed as an actual argument
--- Comment #9 from jvdelisle at gcc dot gnu dot org 2007-10-24 03:39 --- Subject: Bug 33849 Author: jvdelisle Date: Wed Oct 24 03:39:03 2007 New Revision: 129595 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129595 Log: 2007-10-23 Jerry DeLisle [EMAIL PROTECTED] PR forrtran/33849 gfortran.dg/generic_actual_arg.f90: Fix dg-error message. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/generic_actual_arg.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33849
[Bug c++/25950] [DR 391] Reference binding and explicit copy constructors
--- Comment #27 from jason at gcc dot gnu dot org 2007-10-24 03:45 --- Subject: Bug 25950 Author: jason Date: Wed Oct 24 03:45:37 2007 New Revision: 129596 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=129596 Log: PR c++/25950 (DR 391) * call.c (struct conversion): Remove check_copy_constructor_p. (reference_binding): Always bind a reference directly to a compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during temporary creation. (check_constructor_callable): Remove. (convert_like_real): Don't call it. (initialize_reference): Don't call check_constructor_callable. (standard_conversion): Check LOOKUP_NO_CONVERSION instead of LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base conversions if LOOKUP_NO_TEMP_BIND. (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND. (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for second conversion. * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove. Added: trunk/gcc/testsuite/g++.dg/overload/reftemp1.C trunk/gcc/testsuite/g++.dg/overload/reftemp2.C Removed: trunk/gcc/testsuite/g++.dg/init/copy7.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/call.c trunk/gcc/cp/cp-tree.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25950
[Bug tree-optimization/33875] Small performance improvement
--- Comment #2 from ubizjak at gmail dot com 2007-10-24 05:21 --- (In reply to comment #1) Created an attachment (id=14404) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14404action=view) [edit] Small performance improvement Please post this patch (together with comment in Comment #0) to gcc-patches@ mailing list. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33875
[Bug c/33598] gcc 4.2.1 ignores GNU ld on Solaris 9
--- Comment #17 from ebotcazou at gcc dot gnu dot org 2007-10-24 05:26 --- In other words, gcc looks like it requires gnu ld in order to build 64bit on Solaris and that was why we had been building two flavors of it. That's wrong. The file I'm showing above had been build with gcc -mcpu=v9 -m64, so it should pass that along, but it doesn't. No, it shouldn't, you have to pass -m64 at link time. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33598