[Bug driver/83193] Help for invalid -march= options from cc1 omits -march=native on x86-64, arm. aarch64, output also inconsistent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83193 --- Comment #13 from Martin Liška --- Author: marxin Date: Thu Feb 22 12:16:58 2018 New Revision: 257900 URL: https://gcc.gnu.org/viewcvs?rev=257900&root=gcc&view=rev Log: Add "native" as a valid option value for -mcpu/-mtune= on arm (PR driver/83193). 2018-02-22 Martin Liska PR driver/83193 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option): Add "native" as a possible value. Modified: trunk/gcc/ChangeLog trunk/gcc/common/config/arm/arm-common.c
[Bug tree-optimization/83126] [8 Regression] ICE in transform_to_exit_first_loop_alt, at tree-parloops.c:1713
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83126 Tom de Vries changed: What|Removed |Added Keywords||patch --- Comment #10 from Tom de Vries --- https://gcc.gnu.org/ml/gcc-patches/2018-02/msg01272.html
[Bug fortran/84511] [6/7/8 Regression] Internal compiler error from directly printing return of C_LOC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84511 Dominique d'Humieres changed: What|Removed |Added Priority|P3 |P4 Status|UNCONFIRMED |NEW Known to work||4.8.5 Keywords||ice-on-valid-code Last reconfirmed||2018-02-22 Ever confirmed|0 |1 Summary|Internal compiler error |[6/7/8 Regression] Internal |from directly printing |compiler error from |return of C_LOC |directly printing return of ||C_LOC Target Milestone|--- |6.5 Known to fail||4.9.3, 5.5.0, 6.4.0, 7.3.0, ||8.0 --- Comment #1 from Dominique d'Humieres --- Confirmed from 4.9.3 up to trunk (8.0). The test compiles with 4.8.5.
[Bug c/84514] New: powerpc sub optimal condition register reuse with extended inline asm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84514 Bug ID: 84514 Summary: powerpc sub optimal condition register reuse with extended inline asm Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: npiggin at gmail dot com Target Milestone: --- Created attachment 43488 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43488&action=edit test case with description in comment at the top There seem to be some missed opportunities reusing condition register over extended asm (that does not clobber cc).
[Bug fortran/84513] gfortran -M generates circular dependency
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84513 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2018-02-22 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- Similar to/duplicate of pr47720?
[Bug fortran/84513] New: gfortran -M generates circular dependency
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84513 Bug ID: 84513 Summary: gfortran -M generates circular dependency Product: gcc Version: 7.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: eh.toussaint at gmail dot com Target Milestone: --- When using the -M option to let gfortran generate a rule for inclusion in makefiles, the following code (all in one file) results in a circular dependency for the .mod file. $ cat foobar.f90 module bar end module program foo use bar end program ---end foobar.f90 $ gfortran -cpp -M foobar.f90 foobar.o bar.mod: foobar.f90 bar.mod It's not a major problem, because (GNU) Make simply drops it with the following message, but I'd still like to report it for the sake of neatness. make: Circular bar.mod <- bar.mod dependency dropped.
[Bug tree-optimization/84512] New: Missed optimization: should be precalculated in compile-time
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84512 Bug ID: 84512 Summary: Missed optimization: should be precalculated in compile-time Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zamazan4ik at tut dot by Target Milestone: --- gcc(trunk) with '-O3' option for this code: int foo() { int a[10]; for(int i = 0; i < 10; ++i) { a[i] = i*i; } int res = 0; for(int i = 0; i < 10; ++i) { res += a[i]; } return res; } produces this: foo(): movabs rax, 4294967296 mov QWORD PTR [rsp-56], rax movabs rax, 38654705668 mov QWORD PTR [rsp-48], rax movabs rax, 107374182416 mov QWORD PTR [rsp-40], rax movabs rax, 210453397540 mov QWORD PTR [rsp-32], rax movdqa xmm0, XMMWORD PTR [rsp-40] paddd xmm0, XMMWORD PTR [rsp-56] movdqa xmm1, xmm0 psrldq xmm1, 8 paddd xmm0, xmm1 movdqa xmm1, xmm0 psrldq xmm1, 4 paddd xmm0, xmm1 movd eax, xmm0 add eax, 145 ret but clang(trunk) with '-O3' produces this one: foo(): # @foo() mov eax, 285 ret
[Bug c++/80955] Macros expanded in definition of user-defined literals
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80955 --- Comment #4 from Jonathan Wakely --- This causes a regression for: const char* err() { return "Error in "__FILE__; } file.cc: In function ‘const char* err()’: file.cc:1:28: error: unable to find string literal operator ‘operator""__FILE__’ with ‘const char [10]’, ‘long unsigned int’ arguments const char* err() { return "Error in "__FILE__; } ^~~ With GCC 7 this gave a warning about not finding a literal operator, and then continued as the author intended, i.e. concatenating the two strings.
[Bug c++/84493] [8 Regression] ICE with invalid cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Marek Polacek --- Fixed.
[Bug target/83496] MIPS BE: wrong code generates under "-Os -mbranch-cost=1"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83496 --- Comment #16 from Felix Fietkau --- Any update on this, or any way I could help in getting this fixed? It would be nice if we could finally switch OpenWrt to a more recent GCC version soon.
[Bug fortran/84511] New: Internal compiler error from directly printing return of C_LOC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84511 Bug ID: 84511 Summary: Internal compiler error from directly printing return of C_LOC Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: h.ratcliffe at warwick dot ac.uk Target Milestone: --- Created attachment 43487 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43487&action=edit Tarball of 2-file working example Directly printing return from C_LOC causes an internal compiler error if C_LOC is called on a type defined in a module in a separate file. Capturing the return and then printing succeeds. Full error report is f951: internal compiler error: Bad IO basetype (10) 0x5cbd3f gfc_internal_error(char const*, ...) ../../src/gcc/fortran/error.c:1348 0x6bd3fe transfer_expr ../../src/gcc/fortran/trans-io.c:2475 0x6c0748 gfc_trans_transfer(gfc_code*) ../../src/gcc/fortran/trans-io.c:2620 0x6697a7 trans_code ../../src/gcc/fortran/trans.c:2017 0x6be1d6 build_dt ../../src/gcc/fortran/trans-io.c:2028 0x669787 trans_code ../../src/gcc/fortran/trans.c:1989 0x68e887 gfc_generate_function_code(gfc_namespace*) ../../src/gcc/fortran/trans-decl.c:6332 0x66d1f9 gfc_generate_module_code(gfc_namespace*) ../../src/gcc/fortran/trans.c:2195 0x622f3b translate_all_program_units ../../src/gcc/fortran/parse.c:6061 0x622f3b gfc_parse_file() ../../src/gcc/fortran/parse.c:6274 0x66600f gfc_be_parse_file ../../src/gcc/fortran/f95-lang.c:204 Same error arises on gfortran 5.4 and 7.2.0 on Ubuntu and 6.3.0 on OSX, but 4.3.4 on SLES 11 (SP4) succeeds. The error does not occur if module TWO defining the type is in the file where C_LOC is called.
[Bug sanitizer/84508] Load of misaligned address using _mm_load_sd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84508 --- Comment #6 from Marc Glisse --- (In reply to Jakub Jelinek from comment #5) > (In reply to Marc Glisse from comment #3) > > Workaround: define a typedef for double with > > __attribute__((__aligned__(1))), and use _mm_set_sd(*(newtype*)p), that's > > how it will likely be done if we change emmintrin.h." > > I don't think we really support misaligned loads from non-aggregates, there > have been lengthy discussions about that in the past. We already use typedef long long __m128i_u __attribute__ ((__vector_size__ (16), __may_alias__, __aligned__ (1))); _mm_loadu_si128 (__m128i_u const *__P) { return *__P; } So if that doesn't work, it needs fixing in a number of places...
[Bug c++/84493] [8 Regression] ICE with invalid cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84493 --- Comment #2 from Marek Polacek --- Author: mpolacek Date: Thu Feb 22 11:18:37 2018 New Revision: 257899 URL: https://gcc.gnu.org/viewcvs?rev=257899&root=gcc&view=rev Log: PR c++/84493 * parser.c (cp_parser_braced_list): Use require_open instead of consume_open. * g++.dg/parse/error59.C: New test. Added: trunk/gcc/testsuite/g++.dg/parse/error59.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c trunk/gcc/testsuite/ChangeLog
[Bug c++/77655] [6/7/8 Regression]ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1plus))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77655 --- Comment #5 from paolo at gcc dot gnu.org --- Author: paolo Date: Thu Feb 22 10:44:04 2018 New Revision: 257896 URL: https://gcc.gnu.org/viewcvs?rev=257896&root=gcc&view=rev Log: 2018-02-22 Paolo Carlini PR c++/77655 * g++.dg/cpp0x/pr77655.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/pr77655.C Modified: trunk/gcc/testsuite/ChangeLog
[Bug c++/77655] [6/7/8 Regression]ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error: Segmentation fault (program cc1plus))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77655 --- Comment #4 from Paolo Carlini --- This is fixed in trunk. I'm adding the testcase and removing the 8 Regression marker.
[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496 --- Comment #2 from Jakub Jelinek --- Author: jakub Date: Thu Feb 22 09:55:32 2018 New Revision: 257895 URL: https://gcc.gnu.org/viewcvs?rev=257895&root=gcc&view=rev Log: PR c++/84496 * g++.dg/cpp1y/pr84496.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp1y/pr84496.C Modified: trunk/gcc/testsuite/ChangeLog
[Bug c++/84496] [6/7 Regression] Internal compiler error with lambda, static and auto since r236615
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84496 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-02-22 CC||jakub at gcc dot gnu.org, ||jason at gcc dot gnu.org Version|unknown |7.0 Target Milestone|--- |6.5 Summary|Internal compiler error |[6/7 Regression] Internal |with lambda, static and |compiler error with lambda, |auto|static and auto since ||r236615 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek --- Started with r236615 and got fixed on the trunk with r253600. Reduced testcase: // PR c++/84496 // { dg-do compile { target c++14 } } template struct C { static constexpr T D = n; }; struct E : C {}; template struct F : C {}; template T foo (); template struct H { typedef int G; }; template class I; struct L; template struct J; template struct K; struct R { template static J () (foo...)), L> o; }; template struct K : R { typedef decltype (o) G; }; template struct D : K::G>::D, P, Q...> {}; template struct I : D {}; template class function; template struct function { template ::G> struct C; template using U = int; template , typename = U, void>> function (P); }; template template function::function (P) { } void bar (function); void baz () { auto a = [] { static int counter; bar ([] (auto) { counter++; }); }; } Will commit the testcase to trunk now to make sure we don't regress it again.
[Bug c/84510] New: C front-end does not utilise -Wuseless-cast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84510 Bug ID: 84510 Summary: C front-end does not utilise -Wuseless-cast Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bje at gcc dot gnu.org Target Milestone: --- The -Wuseless-cast option only applies to C++ and Objective C. It would also be useful in the C front-end, particularly for finding 'do nothing' casts and casts of literals, which the compiler can do itself by inferring the type of the literal.
[Bug c++/81589] Possible False-Positive with decltype
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81589 Martin Liška changed: What|Removed |Added CC||ville.voutilainen at gmail dot com --- Comment #4 from Martin Liška --- Is there any progress about it? It's blocking chromium build right now..
[Bug sanitizer/84508] Load of misaligned address using _mm_load_sd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84508 --- Comment #5 from Jakub Jelinek --- (In reply to Marc Glisse from comment #3) > Workaround: define a typedef for double with > __attribute__((__aligned__(1))), and use _mm_set_sd(*(newtype*)p), that's > how it will likely be done if we change emmintrin.h." I don't think we really support misaligned loads from non-aggregates, there have been lengthy discussions about that in the past.
[Bug sanitizer/84508] Load of misaligned address using _mm_load_sd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84508 --- Comment #4 from Jakub Jelinek --- I don't see how this is related to sanitizer, sanitizer just checks what it sees. Say _mm_load_sd is implemented as /* Create a vector with element 0 as *P and the rest zero. */ extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__)) _mm_load_sd (double const *__P) { return _mm_set_sd (*__P); } and so pedantically requires aligned load, it is like any other double * dereference. If these intrinsics really allow misaligned loads, then we need to use something different, not sure if e.g. struct S __attribute__((packed)) { double d; } const *p = (struct S const *) (void *) __P; return _mm_set_sd (p->d); would be ok from aliasing POV or if we'd need to introduce a builtin to load a potentially misaligned float or double. I guess the most important would be that it doesn't slow down code.
[Bug sanitizer/84508] Load of misaligned address using _mm_load_sd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84508 --- Comment #3 from Marc Glisse --- Copying from https://gcc.gnu.org/ml/gcc-help/2017-12/msg00031.html "The way _mm_load_sd is currently implemented in gcc, yes, sanitizers are right to complain. Intel could have named the thing _mm_loadu_sd if that's what they meant. It would be simple to change if we decide to do so, please file a PR in bugzilla. Workaround: define a typedef for double with __attribute__((__aligned__(1))), and use _mm_set_sd(*(newtype*)p), that's how it will likely be done if we change emmintrin.h."
[Bug sanitizer/84508] Load of misaligned address using _mm_load_sd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84508 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-02-22 Target Milestone|--- |8.0 Ever confirmed|0 |1 Known to fail||6.4.0, 7.3.0, 8.0 --- Comment #2 from Martin Liška --- Confirmed for all releases supporting -fsanitize=alignment. Clang does not emit the error. Jakub can you please take a look?
[Bug gcov-profile/84509] New: STOP and PAUSE statements with -fdefault-integer-8 and large stop code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84509 Bug ID: 84509 Summary: STOP and PAUSE statements with -fdefault-integer-8 and large stop code Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: jb at gcc dot gnu.org CC: marxin at gcc dot gnu.org Target Milestone: --- Consider the program ! compile with -fdefault-integer-8 program test stop 12345678901 end program test Compiling this with -fdefault-integer-8 and running it results in STOP -539222987 This is because the value is larger than 2**31-1 and is typecasted to an INTEGER(kind=4) before calling the stop function in libgfortran. The same happens for the ERROR STOP and PAUSE statements as well. (Not sure this is actually worth fixing since with -fdefault-integer-8 we're throwing standards conformance out of the window anyway)
[Bug fortran/84509] STOP and PAUSE statements with -fdefault-integer-8 and large stop code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84509 Janne Blomqvist changed: What|Removed |Added Component|gcov-profile|fortran --- Comment #1 from Janne Blomqvist --- Oops, component was supposed to be fortran, not gcov, sorry!
[Bug driver/83193] Help for invalid -march= options from cc1 omits -march=native on x86-64, arm. aarch64, output also inconsistent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83193 --- Comment #12 from Martin Liška --- Author: marxin Date: Thu Feb 22 08:50:41 2018 New Revision: 257893 URL: https://gcc.gnu.org/viewcvs?rev=257893&root=gcc&view=rev Log: Add "native" as a valid option value for -march= on i386 (PR driver/83193). 2018-02-22 Martin Liska PR driver/83193 * config/i386/i386.c (ix86_option_override_internal): Add "native" as a possible value for -march and -mtune. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c
[Bug c++/84502] [8 Regression] Argument corruption when passing empty templated struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84502 Jakub Jelinek changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #8 from Jakub Jelinek --- Fixed.
[Bug tree-optimization/84503] [7 Regression] store-merging miscompilation on powerpc64 with -O3 since r241789
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84503 Jakub Jelinek changed: What|Removed |Added Summary|[7/8 Regression]|[7 Regression] |store-merging |store-merging |miscompilation on powerpc64 |miscompilation on powerpc64 |with -O3 since r241789 |with -O3 since r241789 --- Comment #7 from Jakub Jelinek --- Fixed on the trunk so far, 7.x fix will be very different.
[Bug c++/84502] [8 Regression] Argument corruption when passing empty templated struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84502 --- Comment #7 from Jakub Jelinek --- Author: jakub Date: Thu Feb 22 08:29:56 2018 New Revision: 257892 URL: https://gcc.gnu.org/viewcvs?rev=257892&root=gcc&view=rev Log: PR target/84502 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag to all type variants. * g++.dg/torture/pr84502.C: New test. Added: trunk/gcc/testsuite/g++.dg/torture/pr84502.C Modified: trunk/gcc/ChangeLog trunk/gcc/stor-layout.c trunk/gcc/testsuite/ChangeLog
[Bug tree-optimization/84503] [7/8 Regression] store-merging miscompilation on powerpc64 with -O3 since r241789
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84503 --- Comment #6 from Jakub Jelinek --- Author: jakub Date: Thu Feb 22 08:28:42 2018 New Revision: 257891 URL: https://gcc.gnu.org/viewcvs?rev=257891&root=gcc&view=rev Log: PR tree-optimization/84503 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute width as info->bitpos + info->bitsize - start. (merged_store_group::merge_overlapping): Simplify width computation. (check_no_overlap): New function. (imm_store_chain_info::try_coalesce_bswap): Compute expected start + width and last_order of the group, fail if check_no_overlap fails. (imm_store_chain_info::coalesce_immediate_stores): Don't merge info to group if check_no_overlap fails. * gcc.dg/pr84503-1.c: New test. * gcc.dg/pr84503-2.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr84503-1.c trunk/gcc/testsuite/gcc.dg/pr84503-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/gimple-ssa-store-merging.c trunk/gcc/testsuite/ChangeLog