[Bug c++/54995] Converting lambda to C-style functions when there is template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54995 --- Comment #1 from niXman 2012-10-20 07:15:28 UTC --- > App crash: > http://liveworkspace.org/code/3d5e51c9059ea4f37ce2d0d23739d374 More detailed output. source: #include typedef void(*void_func)(); void foo(void_func f) { f(); } class C { public: template void bar(F f) { auto func = [f, this] { f(); printf("%d!!!\n", k); }; foo(func); } private: int k = 10; }; int main() { printf("%s\n", "ping1"); auto func = [] { printf("called\n"); }; printf("%s\n", "ping2"); C().bar(func); printf("%s\n", "ping3"); } run: $ g++-4.7.2 -std=c++11 ice.cpp -oice && ./ice ping1 ping2 called Segmentation fault (core dumped)
[Bug target/54996] New: gcc with --target=avr fails to build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54996 Bug #: 54996 Summary: gcc with --target=avr fails to build Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: lvd@gmail.com Trying to build avr 4.7.2 gcc with following commands: ./configure --target=avr --enable-languages=c --disable-nls --disable-libssp --with-dwarf2 --prefix=/tmp/avrgcc PATH="/tmp/abu/bin:${PATH}" make where /tmp/abu/bin is temporary build of avr binutils: >/tmp/abu/bin/avr-as --version GNU assembler (GNU Binutils) 2.22.90.20120727 built like: ./configure --prefix=/tmp/abu --program-prefix=avr- --target=avr make make install Get an error: /tmp/abu/bin/avr-as: unrecognized option '--64' system used to build: ubuntu 12.04 >uname -a Linux uebuntu 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux >gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 >as --version GNU assembler (GNU Binutils for Ubuntu) 2.22
[Bug target/54996] gcc with --target=avr fails to build
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54996 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #1 from Andrew Pinski 2012-10-20 07:56:38 UTC --- You need to have the assembler in the PATH while you are configuring GCC also.
[Bug tree-optimization/54986] [4.7 Regression] Internal Error: segmentation fault
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54986 Paolo Carlini changed: What|Removed |Added Component|c++ |tree-optimization Summary|Internal Error: |[4.7 Regression] Internal |segmentation fault |Error: segmentation fault --- Comment #4 from Paolo Carlini 2012-10-20 08:29:05 UTC --- Mainline is fine. Doesn't seem a front-end issue.
[Bug c++/54995] Converting lambda to C-style functions when there is template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54995 --- Comment #2 from Paolo Carlini 2012-10-20 08:31:12 UTC --- May be duplicate of other known issues about lambdas vs templates.
[Bug fortran/54997] New: -Wunused-function gives false warnings for procedures passed as actual argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997 Bug #: 54997 Summary: -Wunused-function gives false warnings for procedures passed as actual argument Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: diagnostic Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org Follow-up to PR54224: module m implicit none private :: s2,s3 contains subroutine s1 call s2(s3) end subroutine subroutine s2(dummy) procedure() :: dummy end subroutine subroutine s3() end subroutine end module When compiled with -Wunused-function, this gives: warning: ‘s3’ defined but not used [-Wunused-function] subroutine s3() Obviously s3 is not being called directly, but it is passed to s2, so it's certainly not unused.
[Bug fortran/54997] -Wunused-function gives false warnings for procedures passed as actual argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997 --- Comment #1 from janus at gcc dot gnu.org 2012-10-20 08:58:19 UTC --- (In reply to comment #0) > Obviously s3 is not being called directly, but it is passed to s2, so it's > certainly not unused. Well, to be honest, 'dummy' is not really used inside of 's2', but you can just add some line like this call dummy() which does not make the false warning go away either. [Of course, diagnosing that 's3' is never actually called in the original test case is not quite trivial in general, and it is not what this PR is aiming for.]
[Bug fortran/54997] -Wunused-function gives false warnings for procedures passed as actual argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997 --- Comment #2 from janus at gcc dot gnu.org 2012-10-20 09:03:30 UTC --- (In reply to comment #0) > subroutine s2(dummy) > procedure() :: dummy > end subroutine Also an "Unused dummy argument" warning is missing here ...
[Bug target/54963] [4.8 Regression] Wrong code generated for libgfortran/generated/eoshift3_8.c on SH
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54963 Oleg Endo changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2012-10-20 AssignedTo|unassigned at gcc dot |olegendo at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #2 from Oleg Endo 2012-10-20 09:29:10 UTC --- Thanks for tracking this one down. The buggy lines are in the negdi_cond pattern: emit_insn (gen_movsi (low_dst, low_src)); emit_insn (gen_movsi (high_dst, high_src)); I'll have a look at it.
[Bug c/54983] ARM gcc creates invalid assembly: bad immediate value for 8-bit offset (1024)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54983 --- Comment #4 from Bastian Hecht 2012-10-20 10:30:28 UTC --- Ok I see. Thanks for taking a look at this! I'll check if this is some regression in the tree and either write a patch or post the issue on the ARM mailing list.
[Bug fortran/48636] Enable more inlining with -O2 and higher
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48636 --- Comment #27 from Jan Hubicka 2012-10-20 10:34:58 UTC --- Thank you for testing. It seems that the patch works well for small benchmarks, I will look into lapack/test_fpu slowdown. There is problem that it really causes inacceptable growth on SPEC2k6 and 2k in non-LTO mode. I will need to analyze some of these testcases and see why we predict so much of speedup when there are no benefits in runtime. Jakub: the plan is to make ipa-cp to handle propagation across aggregates in general (jump functions are already in place), that will handle the array descriptors, too. The fatigue is however different case - the values happens to be loop invariant of the outer loop the function is called from. So inlining enables a lot of invariant code motion. This is similar to cray. Both these cases are now understood by ipa-inline-analysis but the fact is not really used w/o this patch.
[Bug debug/53145] [4.8 Regression] gcc.dg/pch/save-temps-1.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53145 Eric Botcazou changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-10-20 CC||ebotcazou at gcc dot ||gnu.org Ever Confirmed|0 |1 --- Comment #3 from Eric Botcazou 2012-10-20 10:39:07 UTC --- I see it on SPARC/Linux and MIPS/Linux as well.
[Bug fortran/48636] Enable more inlining with -O2 and higher
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48636 --- Comment #28 from Dominique d'Humieres 2012-10-20 11:22:16 UTC --- If I understand correctly the patch, the default value for max-inline-min-speedup is 20. This could be over-agressive: for fatigue.f90 the threshold is between 94 (fast) and 95 (slow). I see a similar threshold for test_fpu.f90 from 100 (fast) to ~97 (slow), unfortunately above 94. Also the choice of true or false for big_speedup_p is based on a test 't-t1>a*t' which is equivalent to 't1<=b*t' with b=1-a. Any reason for the choice? Last point, AFAICT the behavior of the different param tuning the inlining is often non monotonic (I am trying to investigate that in more detail).
[Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989 Steven Bosscher changed: What|Removed |Added CC|steven at gcc dot gnu.org | --- Comment #2 from Steven Bosscher 2012-10-20 12:07:07 UTC --- (In reply to comment #1) > The failure is caused by higher register pressure in the THEN branch of the > case, though I am not sure why the register pressure is higher than x86-linux. You can try and see if this fails on x86-linux with -fPIC. IIRC that's the default for darwin.
[Bug fortran/48636] Enable more inlining with -O2 and higher
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48636 --- Comment #29 from Thomas Koenig 2012-10-20 12:10:49 UTC --- Another approach (not for the benchmarks) would be to make inlining tunable by the user, e.g. support !GCC$ ATTRIBUTES always_inline :: procedure_name See PR 41209.
[Bug c++/54998] New: Internal compiler error with union member initialization using default constructor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54998 Bug #: 54998 Summary: Internal compiler error with union member initialization using default constructor Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: tobias.anderb...@gmail.com class Foo { public: private: static const int kRows = 4; static const int kCols = 4; union { float m_n[kRows][kCols]; float m_m[kRows * kCols] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }; }; }; int main() { Foo myFoo; return 0; } Compile: g++ -std=c++11 foo.cc Result: foo.cc: In constructor ‘constexpr Foo::Foo()’: foo.cc:1:7: internal compiler error: in cx_check_missing_mem_inits, at cp/semantics.c:6166 class Foo { ^ foo.cc:1:7: internal compiler error: Abort trap: 6 g++: internal compiler error: Abort trap: 6 (program cc1plus) Abort trap: 6 System: Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64 GCC build command: ./configure --enable-languages=c,c++ g++ --version g++ (GCC) 4.8.0 20121020 (experimental) Additional notes: By either naming the union, or supplying a default constructor the sample compiles.
[Bug c/40989] -Werror= and #pragma diagnostics do not work with group flags
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40989 --- Comment #10 from Manuel López-Ibáñez 2012-10-20 14:17:14 UTC --- Author: manu Date: Sat Oct 20 14:17:08 2012 New Revision: 192635 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192635 Log: 2012-10-20 Manuel López-Ibáñez PR c/53063 PR c/40989 c-family/ * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit, Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess, Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point, Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused, Wvolatile-register-var): Add LangEnabledBy or EnabledBy. * c-opts.c (c_common_handle_option): Remove explicit handling from here. (c_common_post_options): Likewise. gcc/ * opts.c (finish_options): Remove explicit handling from here. Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-opts.c trunk/gcc/c-family/c.opt trunk/gcc/opts.c
[Bug c/53063] encode group options in the .opt files
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53063 --- Comment #6 from Manuel López-Ibáñez 2012-10-20 14:17:14 UTC --- Author: manu Date: Sat Oct 20 14:17:08 2012 New Revision: 192635 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192635 Log: 2012-10-20 Manuel López-Ibáñez PR c/53063 PR c/40989 c-family/ * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit, Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess, Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point, Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused, Wvolatile-register-var): Add LangEnabledBy or EnabledBy. * c-opts.c (c_common_handle_option): Remove explicit handling from here. (c_common_post_options): Likewise. gcc/ * opts.c (finish_options): Remove explicit handling from here. Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-opts.c trunk/gcc/c-family/c.opt trunk/gcc/opts.c
[Bug lto/54980] [4.8 regression] gimple check: expected gimple_cond(error_mark), have gimple_call() in gimple_cond_set_lhs, at gimple.h:2578
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54980 --- Comment #6 from Dmitry G. Dyachenko 2012-10-20 14:28:28 UTC --- 192529 OK 192538 FAIL
[Bug fortran/31119] -fbounds-check: Check for presence of optional arguments before bound checking
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31119 Jan Hubicka changed: What|Removed |Added CC||hubicka at gcc dot gnu.org --- Comment #7 from Jan Hubicka 2012-10-20 14:38:05 UTC --- Hi, can someone fortran aware please double-check that the tests * gfortran.dg/bounds_check_9.f90: New test. * gfortran.dg/bounds_check_fail_2.f90: New test. do not contain out of bounds access? I am working on path to bound number of loop iterations better based on array accesses and what I see is array A.9 containing values {1,2} that is accessed in the loop header. We bound number of iterations of that loop to 1 (that is one loopback edge iteration to walk both parts of the array) and then the testcases start failing. I do not understand the testcase. Perhaps the bounds-check instrumentation happens too late or we need to disable this logic with -fbounds-check? Honza
[Bug fortran/31119] -fbounds-check: Check for presence of optional arguments before bound checking
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31119 --- Comment #8 from Joost VandeVondele 2012-10-20 14:59:08 UTC --- (In reply to comment #7) > Hi, > can someone fortran aware please double-check that the tests > > * gfortran.dg/bounds_check_9.f90: New test. > * gfortran.dg/bounds_check_fail_2.f90: New test. > > do not contain out of bounds access? I am working on path to bound number of > loop iterations better based on array accesses and what I see is array A.9 > containing values {1,2} that is accessed in the loop header. > We bound number of iterations of that loop to 1 (that is one loopback edge > iteration to walk both parts of the array) and then the testcases start > failing. > > I do not understand the testcase. > Perhaps the bounds-check instrumentation happens too late or we need to > disable > this logic with -fbounds-check? > > Honza According to me, the first testcase (bounds_check_9.f90) should contain no out-of-bounds access (at least from the fortran point of view, and also according to valgrind), while the second testcase (bounds_check_fail_2.f90) does contain out-of-bounds access (by design). Of course, -fbounds-check is designed to catch out-of-bounds at runtime (which the second testcase tests). Of course, fortran programs with out-of-bounds access are not standard conforming. Actually, the situation is a bit bizarre. There are no conforming programs for which bounds-checking can trigger... all these bounds-checking statements can be just optimized away :-). That's not quite what the users want... I run -fbounds-check -O2 quite often. I don't think one should switch off optimization in the presence of -fbounds-check. Maybe the docs should be enhanced and mention that bounds checking is most effective at -O0 ?
[Bug c++/54999] New: [4.8 regression] ICE in tsubst_copy, at cp/pt.c:12387
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54999 Bug #: 54999 Summary: [4.8 regression] ICE in tsubst_copy, at cp/pt.c:12387 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: vincenzo.innoce...@cern.ch (most probably related to 54844 and all others involving "sizeof") got several of those mostly in memcpy as below (known to work in trunk revision 191215) c++ -v Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/afs/cern.ch/user/i/innocent/w3/gcc47slc5/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --disable-multilib --enable-gold=yes --disable-nls --enable-lto --with-mpc=/afs/cern.ch/cms/slc5_amd64_gcc472/external/gcc/4.7.2 --with-gmp=/afs/cern.ch/cms/slc5_amd64_gcc472/external/gcc/4.7.2 --with-mpfr=/afs/cern.ch/cms/slc5_amd64_gcc472/external/gcc/4.7.2 --prefix=/afs/cern.ch/user/i/innocent/w3/gcc47slc5 --enable-languages=c,c++,fortran,lto Thread model: posix gcc version 4.8.0 20121020 (experimental) [trunk revision 192631] (GCC) [vocms123] ~/public/ctest/bugs48 $ c++ -msse3 -std=c++11 -c -O2 ice_mcp.ii In file included from /afs/cern.ch/cms/sw/ReleaseCandidates/slc5_amd64_gcc472/thu/6.1.LTO-thu-02/CMSSW_6_1_LTO_X_2012-10-18-0200/src/DataFormats/CLHEP/interface/AlgebraicObjects.h:16:0, from /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/DataFormats/TrackingRecHit/interface/TrackingRecHit.h:4, from /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h:4, from /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/TrackingTools/PatternTools/interface/MeasurementExtractor.h:4, from /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/TrackingTools/PatternTools/src/MeasurementExtractor.cc:1: /afs/cern.ch/cms/sw/ReleaseCandidates/slc5_amd64_gcc472/thu/6.1.LTO-thu-02/CMSSW_6_1_LTO_X_2012-10-18-0200/src/DataFormats/CLHEP/interface/Migration.h: In instantiation of 'CLHEP::HepVector asHepVector(const ROOT::Math::SVector&) [with unsigned int N = 5u]': /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/TrackingTools/PatternTools/src/MeasurementExtractor.cc:4:73: required from here /afs/cern.ch/cms/sw/ReleaseCandidates/slc5_amd64_gcc472/thu/6.1.LTO-thu-02/CMSSW_6_1_LTO_X_2012-10-18-0200/src/DataFormats/CLHEP/interface/Migration.h:45:35: internal compiler error: in tsubst_copy, at cp/pt.c:12387 memcpy(&hv[0], &v[0], N*sizeof(double)); ^ 0x582883 tsubst_copy ../../gcc-trunk/gcc/cp/pt.c:12387 0x5722e2 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:13514 0x571701 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:13539 0x571182 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:13494 0x5726ae tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc-trunk/gcc/cp/pt.c:13749 0x57a224 tsubst_expr ../../gcc-trunk/gcc/cp/pt.c:13194 0x57b19b tsubst_expr ../../gcc-trunk/gcc/cp/pt.c:12679 0x57992b tsubst_expr ../../gcc-trunk/gcc/cp/pt.c:12665 0x579aac tsubst_expr ../../gcc-trunk/gcc/cp/pt.c:12849 0x578326 instantiate_decl(tree_node*, int, bool) ../../gcc-trunk/gcc/cp/pt.c:18671 0x5b3103 instantiate_pending_templates(int) ../../gcc-trunk/gcc/cp/pt.c:18770 0x5ef650 cp_write_global_declarations() ../../gcc-trunk/gcc/cp/decl2.c:3993 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. known to work c++ -msse3 -std=c++11 -c -O2 ice_mcp.ii pb-d-128-141-131-94:bugs48 innocent$ c++ -v Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.1.0/4.8.0/lto-wrapper Target: x86_64-apple-darwin12.1.0 Configured with: ./configure --enable-languages=c,c++,fortran --disable-multilib --disable-bootstrap --enable-lto -disable-libitm Thread model: posix gcc version 4.8.0 20120912 (experimental) [trunk revision 191215] (GCC) Fails also in pb-d-128-141-131-94:bugs48 innocent$ c++ -msse3 -std=c++11 -c -O2 ice_mcp.ii In file included from /afs/cern.ch/cms/sw/ReleaseCandidates/slc5_amd64_gcc472/thu/6.1.LTO-thu-02/CMSSW_6_1_LTO_X_2012-10-18-0200/src/DataFormats/CLHEP/interface/AlgebraicObjects.h:16:0, from /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/DataFormats/TrackingRecHit/interface/TrackingRecHit.h:4, from /build/vin/CMSSW_6_1_LTO_X_2012-10-18-0200/src/TrackingTools/TransientTrackingRecHit
[Bug c++/54844] [4.8 Regression] ice tsubst_copy, at cp/pt.c:12352
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54844 vincenzo Innocente changed: What|Removed |Added CC||vincenzo.innocente at cern ||dot ch --- Comment #9 from vincenzo Innocente 2012-10-20 15:26:03 UTC --- *** Bug 54999 has been marked as a duplicate of this bug. ***
[Bug c++/54999] [4.8 regression] ICE in tsubst_copy, at cp/pt.c:12387
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54999 vincenzo Innocente changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE --- Comment #1 from vincenzo Innocente 2012-10-20 15:26:03 UTC --- patch http://gcc.gnu.org/bugzilla/attachment.cgi?id=28449 seems to solve the issue but I get ../.././gcc/cp/pt.c: In function ‘int push_tinst_level(tree_node*)’: ../.././gcc/cp/pt.c:7885: warning: unknown conversion type character ‘S’ in format ../.././gcc/cp/pt.c:7885: warning: too many arguments for format ../.././gcc/cp/pt.c: In function ‘tree_node* tsubst_copy_and_build(tree_node*, tree_node*, tsubst_flags_t, tree_node*, bool, bool)’: ../.././gcc/cp/pt.c:13291: warning: format not a string literal and no format arguments compiling gcc *** This bug has been marked as a duplicate of bug 54844 ***
[Bug fortran/31119] -fbounds-check: Check for presence of optional arguments before bound checking
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31119 --- Comment #9 from Dominique d'Humieres 2012-10-20 15:43:13 UTC --- > can someone fortran aware please double-check that the tests > >* gfortran.dg/bounds_check_9.f90: New test. >* gfortran.dg/bounds_check_fail_2.f90: New test. > > do not contain out of bounds access? ... AFAICT the only difference (ignoring spaces) between the two tests is the line call sub((/4/)) in the second test. So there is no out of bounds access for the first test, but in the second one the call to sub((/4/)) in which an array of length 1 is copied in an array of length 2, gives an out of bounds access triggering the error: Fortran runtime error: Array bound mismatch for dimension 1 of array 'ivec' (1/2) when compiled with -fbounds-check. IMO these tests are a misuse of the elemental subroutine set_optional in the subroutine sub. The test being valid only if sub is called without argument or with an array of length 2. >From the 2008 standard 12.8.3 Elemental subroutine actual arguments An elemental subroutine has only scalar dummy arguments, but may have array actual arguments. In a reference to an elemental subroutine, either all actual arguments shall be scalar, or all actual arguments corresponding to INTENT (OUT) and INTENT (INOUT) dummy arguments shall be arrays of the same shape and the remaining actual arguments shall be conformable with them. In the case that the actual arguments corresponding to INTENT (OUT) and INTENT (INOUT) dummy arguments are arrays, the values of the elements, if any, of the results are the same as would be obtained if the subroutine had been applied separately, in array element order, to corresponding elements of each array actual argument.
[Bug fortran/54725] cross gfortran always searches host paths (e.g. /usr/include)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54725 --- Comment #8 from Mike Frysinger 2012-10-20 16:55:05 UTC --- (In reply to comment #7) that patch doesn't work as there is a typo in Make-lang.in. it needs to be: CFLAGS-fortran/cpp.o += $(TARGET_SYSTEM_ROOT_DEFINE) then it works OK
[Bug rtl-optimization/47389] ICE: in calc_dfs_tree, at dominance.c:395 with -fno-combine-stack-adjustments -fno-dse -fno-tree-forwprop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47389 Mikael Pettersson changed: What|Removed |Added CC||mikpe at it dot uu.se --- Comment #6 from Mikael Pettersson 2012-10-20 17:08:16 UTC --- The ICE stopped on trunk with r188360, rth's "Fix c++/53602, part 2": http://gcc.gnu.org/ml/gcc-patches/2012-06/msg00537.html http://gcc.gnu.org/viewcvs?view=revision&revision=188360 This patch doesn't appear to be an actual bug fix, so I suspect the underlying issue is still latent.
[Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989 --- Comment #3 from Jack Howarth 2012-10-20 17:11:16 UTC --- (In reply to comment #1) > The failure is caused by higher register pressure in the THEN branch of the > case, though I am not sure why the register pressure is higher than x86-linux. > In case it helps, the exact compiler defaults on darwin are... # GNU C++ (GCC) version 4.8.0 20121019 (experimental) (x86_64-apple-darwin12.2.0) # compiled by GNU C version 4.8.0 20121019 (experimental), GMP version 5.0.5, MPFR version 3.1.1, MPC version 1.0.1 # GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 # options passed: -D__DYNAMIC__ t.cc -fPIC -mmacosx-version-min=10.8.2 # -mtune=core2 -fverbose-asm # options enabled: -Wnonportable-cfstrings -fPIC # -fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg -fcommon # -fdelete-null-pointer-checks -fearly-inlining # -feliminate-unused-debug-types -fexceptions -ffunction-cse -fgcse-lm # -fident -finline-atomics -fira-hoist-pressure -fira-share-save-slots # -fira-share-spill-slots -fivopts -fkeep-static-consts # -fleading-underscore -fmath-errno -fmerge-debug-strings # -fmove-loop-invariants -fnext-runtime -fobjc-abi-version= -fpeephole # -fprefetch-loop-arrays -freg-struct-return # -fsched-critical-path-heuristic -fsched-dep-count-heuristic # -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic # -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic # -fsched-stalled-insns-dep -fshow-column -fsigned-zeros # -fsplit-ivs-in-unroller -fstrict-volatile-bitfields -fsync-libcalls # -ftrapping-math -ftree-coalesce-vars -ftree-cselim -ftree-forwprop # -ftree-loop-if-convert -ftree-loop-im -ftree-loop-ivcanon # -ftree-loop-optimize -ftree-parallelize-loops= -ftree-phiprop -ftree-pta # -ftree-reassoc -ftree-scev-cprop -ftree-slp-vectorize # -ftree-vect-loop-version -funit-at-a-time -funwind-tables -fverbose-asm # -fzero-initialized-in-bss -gstrict-dwarf -m128bit-long-double -m64 # -m80387 -maccumulate-outgoing-args -malign-stringops -matt-stubs # -mconstant-cfstrings -mfancy-math-387 -mfp-ret-in-387 -mieee-fp # -mlong-double-80 -mmmx -mno-sse4 -mpush-args -mred-zone -msse -msse2 # -msse3
[Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989 --- Comment #4 from Jack Howarth 2012-10-20 17:39:45 UTC --- (In reply to comment #1) i can confirm that the proposed simplification of the test cases eliminates the failures of hoist-register-pressure.c at -m32 on x86_64-apple-darwin12. I can also confirm that the original test case passes if -fno-PIC is added to dg-options.
[Bug tree-optimization/54855] Unnecessary duplication when performing scalar operation on vector element
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54855 --- Comment #6 from Marc Glisse 2012-10-20 17:43:44 UTC --- Uros' reply at http://gcc.gnu.org/ml/gcc-patches/2012-10/msg01327.html copied here for convenience: "But, we _do_ have vec_merge pattern that describes the operation. Adding another one to each operation just to satisfy combine is IMO not correct approach. I'd rather see generic RTX simplification that simplifies your proposed pattern to vec_merge pattern. Also, as you mention in PR54855, Comment #5, the approach is too fragile..."
[Bug target/54989] FAIL: gcc.dg/hoist-register-pressure.c scan-rtl-dump hoist "PRE/HOIST: end of bb .* copying expression" on darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54989 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-10-20 Ever Confirmed|0 |1 --- Comment #5 from Dominique d'Humieres 2012-10-20 17:44:50 UTC --- I also see it on x86_64-apple-darwin10.
[Bug middle-end/55001] New: Handle VEC_COND_EXPR in tree-vect-generic.c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55001 Bug #: 55001 Summary: Handle VEC_COND_EXPR in tree-vect-generic.c Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: gli...@gcc.gnu.org Created attachment 28497 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28497 Old patch Hello, the code in tree-vect-generic.c to handle vector operations not provided by the target doesn't know VEC_COND_EXPR. That didn't matter when the vectorizer was the only producer, but front-ends are going to produce them as well any day now. Attaching the patch I was using when experimenting, but IIRC it wasn't in a state for submission, and its assumption that the first argument can't be an SSA_NAME or a constant is now wrong.
[Bug fortran/54997] -Wunused-function gives false warnings for procedures passed as actual argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997 --- Comment #3 from janus at gcc dot gnu.org 2012-10-20 18:45:05 UTC --- (In reply to comment #2) > Also an "Unused dummy argument" warning is missing here ... This is fixed by the following patch: Index: gcc/fortran/decl.c === --- gcc/fortran/decl.c(revision 192619) +++ gcc/fortran/decl.c(working copy) @@ -4941,8 +4941,6 @@ match_procedure_decl (void) } - gfc_set_sym_referenced (sym); - if (gfc_match_eos () == MATCH_YES) return MATCH_YES; if (gfc_match_char (',') != MATCH_YES)
[Bug c++/55002] New: trailing return type is rejected in function signature
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55002 Bug #: 55002 Summary: trailing return type is rejected in function signature Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: leo...@volnitsky.com 7.1.6.4 auto specifier [dcl.spec.auto] note 2: The auto type-specifier may appear with a function declarator with a trailing-return-type (8.3.5) in any context where such a declarator is valid Contrived example: - typedef unsigned long size_t; // overload c-array template size_t size(T (&)[N]) { return N; } // overload - c-string template size_t size(char (&A)[N]) { size_t i=0; while(A[i++]); return i; } // APPLY // this works template size_t apply (const T (&A)[N], size_t (*f) (const T (&)[N])) // this rejected -- error: parameter declared ‘auto’ //template size_t apply (const T (&A)[N], auto (*f) -> size_t (const T (&)[N])) { return f(A); }; int main() { int A[2]; return apply(A, size); } -- Without trailing return type in signature it is impossible to write apply-like function with can deduce function-type for overloaded functions.
[Bug c++/55002] trailing return type is rejected in function signature
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55002 --- Comment #1 from Leonid Volnitsky 2012-10-20 19:20:00 UTC --- I've probably overcomplicated my example. Simpler test case: -- int f(auto (*ff) -> int (int) ) { return ff(1); } --
[Bug c++/55002] trailing return type is rejected in function signature
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55002 Daniel Krügler changed: What|Removed |Added CC||daniel.kruegler at ||googlemail dot com --- Comment #2 from Daniel Krügler 2012-10-20 20:24:19 UTC --- Your issue looks invalid to me, because you are never providing a pointer to function declarator. Lets look first at your simplified example: auto (*ff) -> int (int) This would be an invalid function declarator, because there is (a) no parameter list and (b) the return type is a function type int(int), which is never possible. I can only assume you mean int f(auto (*ff)(int) -> int) { return ff(1); } and this is accepted. A similar defect is in your original code, where the only valid form would be template size_t apply (const T (&A)[N], auto (*f)(const T (&)[N]) -> size_t) { return f(A); } which is also accepted.
[Bug middle-end/54315] unnecessary copy of return value for union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54315 --- Comment #5 from Eric Botcazou 2012-10-20 21:00:26 UTC --- Author: ebotcazou Date: Sat Oct 20 21:00:23 2012 New Revision: 192641 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192641 Log: PR rtl-optimization/54315 * calls.c (expand_call): Don't deal specifically with BLKmode values returned in naked registers. * expr.h (copy_blkmode_from_reg): Adjust prototype. * expr.c (copy_blkmode_from_reg): Rename first parameter into TARGET and make it required. Assert that SRCREG hasn't BLKmode. Add a couple of short-circuits for common cases and be prepared for sub-word registers. (expand_assignment): Call copy_blkmode_from_reg for BLKmode values returned in naked registers. (store_expr): Likewise. (store_field): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/calls.c trunk/gcc/expr.c trunk/gcc/expr.h
[Bug middle-end/54315] unnecessary copy of return value for union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54315 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|NEW AssignedTo|ebotcazou at gcc dot|unassigned at gcc dot |gnu.org |gnu.org --- Comment #6 from Eric Botcazou 2012-10-20 21:08:48 UTC --- The patch removes half of the useless stores on x86-64.
[Bug fortran/54224] Warn for unused (private) module variables and internal procedures
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54224 --- Comment #15 from janus at gcc dot gnu.org 2012-10-20 21:17:54 UTC --- (In reply to comment #14) > (In reply to comment #12) > > * unused-warnings for module variables Here is a draft patch which fixes the test case in comment 14: Index: gcc/fortran/trans-decl.c === --- gcc/fortran/trans-decl.c(revision 192619) +++ gcc/fortran/trans-decl.c(working copy) @@ -3999,6 +4001,20 @@ static void && sym->ts.type == BT_DERIVED) sym->backend_decl = gfc_typenode_for_spec (&(sym->ts)); + /* Warn for unused private module variables. */ + if (warn_unused_variable && !sym->attr.referenced + && (sym->attr.access == ACCESS_PRIVATE + || (sym->attr.access == ACCESS_UNKNOWN + && sym->ns->default_access == ACCESS_PRIVATE)) + && !(sym->attr.in_common || sym->attr.use_assoc || sym->mark + || sym->attr.in_namelist || sym->attr.flavor == FL_MODULE)) +{ + gfc_warning ("Unused private module variable '%s' declared at %L", + sym->name, &sym->declared_at); + if (sym->backend_decl != NULL_TREE) +TREE_NO_WARNING(sym->backend_decl) = 1; +} + if (sym->attr.flavor == FL_DERIVED && sym->backend_decl && TREE_CODE (sym->backend_decl) == RECORD_TYPE) as well as this extended version (and regtests cleanly): module m integer :: j integer, private :: k ! { dg-error "Unused private module variable" } end module module m2 private real :: r ! { dg-error "Unused private module variable" } real, public :: p end module
[Bug fortran/54997] -Wunused-function gives false warnings for procedures passed as actual argument
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54997 --- Comment #4 from janus at gcc dot gnu.org 2012-10-20 21:46:12 UTC --- The following removes the warning for s3: Index: gcc/fortran/trans-decl.c === --- gcc/fortran/trans-decl.c(revision 192619) +++ gcc/fortran/trans-decl.c(working copy) @@ -1854,6 +1854,9 @@ build_function_decl (gfc_symbol * sym, bool global || sym->attr.public_used)) TREE_PUBLIC (fndecl) = 1; + if (sym->attr.referenced) +TREE_USED (fndecl) = 1; + attributes = add_attributes_to_decl (attr, NULL_TREE); decl_attributes (&fndecl, attributes, 0); but it also removes the warning on procedures which are really unused :(
[Bug c++/55003] New: [C++11] Member function pointer not working as constexpr initializer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55003 Bug #: 55003 Summary: [C++11] Member function pointer not working as constexpr initializer Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: lee.mccul...@gmail.com This piece of code template struct MemberGet{ static constexpr auto assign_operator = static_cast(&T::operator=); }; fails with this error: error: declaration of ‘constexpr const auto MemberGet::assign_operator’ has no initializer on with gcc -v: Using built-in specs. COLLECT_GCC=/usr/bin/g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /build/src/gcc-4.7.2/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --enable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release Thread model: posix gcc version 4.7.2 (GCC) I'm pretty certain that this code is valid C++ as it does compile in clang++ (built on top of this gcc version).
[Bug c++/55002] trailing return type is rejected in function signature
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55002 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #3 from Paolo Carlini 2012-10-20 22:55:59 UTC --- Closing.
[Bug c++/55004] New: [meta-bug] constexpr issues
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 Bug #: 55004 Summary: [meta-bug] constexpr issues Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: paolo.carl...@oracle.com
[Bug c++/55004] [meta-bug] constexpr issues
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 Paolo Carlini changed: What|Removed |Added Keywords||meta-bug Status|UNCONFIRMED |NEW Last reconfirmed||2012-10-20 Ever Confirmed|0 |1
[Bug c++/54998] Internal compiler error with union member initialization using default constructor
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54998 Paolo Carlini changed: What|Removed |Added Severity|major |normal
[Bug c++/54922] [C++11][DR 1359] constexpr constructors require initialization of all union members
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-10-20 Blocks||55004 Ever Confirmed|0 |1
[Bug c++/54922] [C++11][DR 1359] constexpr constructors require initialization of all union members
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922 --- Comment #2 from Paolo Carlini 2012-10-20 23:21:42 UTC --- Related to PR54768.
[Bug c++/54922] [C++11][DR 1359] constexpr constructors require initialization of all union members
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54922 --- Comment #3 from Paolo Carlini 2012-10-20 23:31:41 UTC --- Related to PR51675.
[Bug rtl-optimization/54991] [LRA] internal compiler error: in lra_assign, at lra-assigns.c:1361
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54991 --- Comment #2 from Vladimir Makarov 2012-10-21 02:47:32 UTC --- Author: vmakarov Date: Sun Oct 21 02:47:28 2012 New Revision: 192645 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192645 Log: 2012-10-20 Vladimir Makarov PR rtl-optimization/54991 * lra-constraints.c (lra_constraints): Change equiv memory check on reverse equivalence check. (inherit_in_ebb): Invalidate usage insns for multi-word hard regs. Modified: branches/lra/gcc/ChangeLog branches/lra/gcc/lra-constraints.c
[Bug tree-optimization/55005] New: [4.8 Regression] gcc.c-torture/execute/loop-3.c FAILs with -fPIC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55005 Bug #: 55005 Summary: [4.8 Regression] gcc.c-torture/execute/loop-3.c FAILs with -fPIC Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Created attachment 28498 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28498 reduced testcase There are various compiler flags that cause the FAIL. Output: $ gcc -O3 -fPIC testcase.c && ./a.out Aborted $ gcc -O2 -funroll-loops -fPIC testcase.c && ./a.out Aborted $ gcc -O2 -fpeel-loops -fPIC testcase.c && ./a.out Aborted $ gcc -O2 -flto -fPIC testcase.c && ./a.out Aborted Tested revisions: r192641 - fail r191586 - OK 4.7 r191640 - OK