[Bug tree-optimization/101610] CST - (x ^ (CST-1)) can be optimized to x + 1 if x < CST and CST is a power of 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101610 --- Comment #1 from Andrew Pinski --- I noticed this while looking into PR 78103.
[Bug middle-end/78103] Failure to optimize with __builtin_clzl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78103 --- Comment #7 from Andrew Pinski --- Part of the problem is __builtin_clzl returns a signed integer :).
[Bug tree-optimization/101610] New: CST - (x ^ (CST-1)) can be optimized to x + 1 if x < CST and CST is a power of 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101610 Bug ID: 101610 Summary: CST - (x ^ (CST-1)) can be optimized to x + 1 if x < CST and CST is a power of 2 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Take: unsigned long f(unsigned long x) { if (x >= 64)__builtin_unreachable(); x = x ^ 63; unsigned long y = (unsigned long )x; unsigned long z = 64 - y; return z; } This should just be: unsigned long long f1(unsigned long x) { return x + 1; }
[Bug debug/101598] [debug, ada] .loc generated for defs__struct1IP
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101598 --- Comment #6 from Bernd Edlinger --- (In reply to Tom de Vries from comment #4) > (In reply to Bernd Edlinger from comment #2) > > Yes, but it wont fix dwarf-4 and also not the case > > when this is not the first function. then we'll > > have the .loc from the previous function extend to this one. > > I just tried out: > - dwarf-4 > - manually changing order of defs__f1 and defs__struct1IP in .s file > > The result look fine to me. So please show a concrete example where this > produces wrong results. I did the same. The effect I meant is the following which is basically PR97937 The line number from the previous function defs__f1 extends to defs__structIP. So when I debug this I see the following: Reading symbols from ./formatted_ref... (gdb) b defs__struct1IP Breakpoint 1 at 0x402faa: file defs.adb, line 21. (gdb) r Starting program: /home/ed/gnu/binutils-gdb/gdb/testsuite/gdb.ada/formatted_ref/formatted_ref Breakpoint 1, 0x00402faa in defs__struct1IP () at defs.adb:21 21 end F1; This here the line number is totally misleading. So to me it appears, that PR101575 is just the evil twin brother of PR97937. And indeed the fix for PR97937 - excluding the really not debuggable funtions from the debug ranges - is not sufficient to get rid of the bogus line table entries from PR101575. So I start to think that emitting a dummy .file table entry as you suggest is the way to go, but I would like not to break the fix for PR97937 at the same time.
[Bug middle-end/43686] GCC doesn't duplicate computed gotos for functions marked as "hot"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43686 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Target Milestone|--- |5.0 --- Comment #4 from Andrew Pinski --- Fixed in GCC 4.5. I see the duplicated indirect jumps for the no attribute case and the attribute hot cases. And for the cold case, it is a direct jump to a bb containing the indirect jump. Also fully fixed for GCC 5 by r5-1621.
[Bug target/70308] memset generates rep stosl instead of rep stosq
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70308 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization Component|middle-end |target --- Comment #8 from Andrew Pinski --- /* Even if the string operation call is cold, we still might spend a lot of time processing large blocks. */ if (optimize_function_for_size_p (cfun) || (optimize_insn_for_size_p () && (max_size < 256 || (expected_size != -1 && expected_size < 256 optimize_for_speed = false; else optimize_for_speed = true; cost = optimize_for_speed ? ix86_cost : &ix86_size_cost; Somewhere in decide_alg decides rep_4byte vs rep_8byte for optimize for size. So this is a target issue.
[Bug middle-end/27800] extra temprorary created when gimplifying return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27800 Andrew Pinski changed: What|Removed |Added Keywords||compile-time-hog, ||memory-hog Last reconfirmed|2006-05-29 21:13:57 |2021-7-23 Severity|normal |enhancement
[Bug target/101609] no right shift pattern for vector(2) long long on aarch64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101609 --- Comment #1 from Andrew Pinski --- Note I found this while looking into PR 56873.
[Bug middle-end/56873] vector shift lowered to scalars
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56873 --- Comment #2 from Andrew Pinski --- This looks to be fixed in GCC 5.1.
[Bug target/101609] New: no right shift pattern for vector(2) long long on aarch64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101609 Bug ID: 101609 Summary: no right shift pattern for vector(2) long long on aarch64 Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: aarch64*-*-* Take: #define SIZE 16 typedef long long veci __attribute__((vector_size(SIZE))); void f(veci &a, veci &b, veci &c){ c= a>>b; } - CUT We currently produce: ldr q1, [x1] ldr q0, [x0] fmovd3, d1 dup d1, v1.d[1] fmovd2, d0 dup d0, v0.d[1] neg d4, d3 sshld4, d2, d4 neg d2, d1 sshld2, d0, d2 fmovx1, d4 fmovx0, d2 stp x1, x0, [x2] ret - CUT But we should be able to do: ldr q0, [x1] ldr q1, [x0] neg v0.2d, v0.2d sshlv0.2d, v1.2d, v0.2d str q0, [x2]
[Bug tree-optimization/20514] hoisting of label out of jumptable would take place at cse, should happen at trees
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20514 --- Comment #8 from Andrew Pinski --- Note I noticed gimple loop code invariant motion is causing comment #0 to be really bad.
[Bug go/46986] Go is not supported on Darwin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986 --- Comment #41 from Eric Gallager --- Would this package help at all? https://github.com/blacktop/go-macho
[Bug target/56160] unnecessary additions in loop [x86, x86_64]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56160 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization Target||x86_64-linux-gnu Component|middle-end |target --- Comment #5 from Andrew Pinski --- This is just IV-OPTs going wrong. One thing which I will note does improve the code is doing: __m128 n = _mm_cmpneq_ps(res, res); int need = _mm_movemask_ps(n); if (UNLIKELY(need)) { comp_mult(r, a, b, i); } else _mm_store_ps((float*)&r[i], res);
[Bug middle-end/56120] built-in SIMD with statement expression causes ICE: in iterative_hash_expr, at tree.c:6990 when optimization is on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56120 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Target Milestone|--- |4.8.0 --- Comment #3 from Andrew Pinski --- Fixed in GCC 4.8.0.
[Bug libstdc++/101608] New: ranges::fill/fill_n missing std::is_constant_evaluated() condition for __builtin_memset
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101608 Bug ID: 101608 Summary: ranges::fill/fill_n missing std::is_constant_evaluated() condition for __builtin_memset Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- ranges_algobase.h#L529: if constexpr (is_pointer_v<_Out> // Note that __is_byte already implies !is_volatile. && __is_byte>::__value && integral<_Tp>) { __builtin_memset(__first, static_cast(__value), __n); return __first + __n; } We should ensure that std::is_constant_evaluated() is false before calling __builtin_memset since it is not usable in constexpr contexts. #include constexpr auto unused = [] { std::array r{}; std::ranges::fill(r, 0); return 0; }(); https://godbolt.org/z/bnYxY78o8
[Bug c++/101563] ICE in lookup_template_class_1, at cp/pt.c:10184
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101563 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-24 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- Confirmed. not a regression.
[Bug c++/90550] ICE in determine_visibility, at cp/decl2.c:2567
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90550 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Last reconfirmed|2019-05-20 00:00:00 | Target Milestone|--- |11.0 --- Comment #3 from Andrew Pinski --- Fixed in GCC 11: : In instantiation of 'void f() [with = int]': :9:10: required from here :5:15: error: 'f()::S::a b' has incomplete type 5 | struct S::a b; | ^ Compiler returned: 1
[Bug c++/101498] gcc accepts template code with 'auto' as subtype
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101498 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-24 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Depends on||96464 --- Comment #1 from Andrew Pinski --- Confirmed. Most likely a dup of bug 96464. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96464 [Bug 96464] GCC accepts 'auto' in template argument
[Bug c++/101486] Rejects valid qualification conversion involving array of unknown bound in function template argument [P0388]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101486 --- Comment #2 from Andrew Pinski --- Note GCC accepts the following while both clang and ICC don't: template void f1(const T(*)[10]); template void f2(T(*)[]); void bar(int (*ptr)[10]) { f1(ptr); f2(ptr); } So GCC at least is doing the conversion correctly.
[Bug c++/101486] Rejects valid qualification conversion involving array of unknown bound in function template argument [P0388]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101486 --- Comment #1 from Andrew Pinski --- clang and ICC reject this. clang error message: :9:5: error: no matching function for call to 'f2' f2(ptr); // rejects ^~ :5:6: note: candidate template ignored: could not match 'type-parameter-0-0 []' against 'int [10]' void f2(T(*)[]); ^
[Bug c++/101499] ICE: in dependent_type_p, at cp/pt.c:26765
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101499 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Blocks||67491 Last reconfirmed||2021-07-24 --- Comment #1 from Andrew Pinski --- Confirmed. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 [Bug 67491] [meta-bug] concepts issues
[Bug c++/57712] GCC fails to to match out-of-line template member function definition with declaration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57712 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=81188 --- Comment #3 from Andrew Pinski --- Most likely a dup of bug 81188.
[Bug c++/57712] GCC fails to to match out-of-line template member function definition with declaration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57712 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |7.2 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- Fixed in GCC 7.2.
[Bug c++/61368] Sfinae with template member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61368 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=57943 --- Comment #3 from Andrew Pinski --- Most likely by the patch which fixed PR 57943.
[Bug c++/61368] Sfinae with template member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61368 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |11.0 --- Comment #2 from Andrew Pinski --- Fixed in GCC 11.
[Bug c++/66763] [6 Regression] 25_algorithms/remove/requirements/explicit_instantiation/2.cc fails on AIX
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66763 --- Comment #12 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #6) > The difference is that we include ::remove in C++11 and later. You had even forgot you filed PR 57576 for that :)
[Bug c++/66763] [6 Regression] 25_algorithms/remove/requirements/explicit_instantiation/2.cc fails on AIX
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66763 --- Comment #11 from Andrew Pinski --- *** Bug 57576 has been marked as a duplicate of this bug. ***
[Bug c++/57576] Using declaration hides template for purposes of explicit instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57576 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Target Milestone|--- |6.0 Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- Dup of bug 66763. *** This bug has been marked as a duplicate of bug 66763 ***
[Bug c++/53434] Compiler decides declaration/expression ambiguity too soon.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53434 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2012-05-26 00:00:00 |2021-7-23 --- Comment #2 from Andrew Pinski --- Self contained testcase without include: struct d { d(const char*); }; class S { public: d getString( d const& ) const; }; class C { public: C(); S const& operator[]( d const& ) const; }; void f() { static d const s(C()["a"].getString("b")); }
[Bug c/100501] ICE with inline-asm and void statement expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100501 --- Comment #6 from Chengnian Sun --- Another duplicate. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210723 (experimental) [master revision :3eeaf64a5:01ac2f08b0105a1c85425d0e59216eb528c6d2ab] (GCC) $ cat mutant.c foo() { __asm__("" : : "m"(({}))); } $ gcc-trunk -w mutant.c mutant.c: In function ‘foo’: mutant.c:1:29: internal compiler error: Segmentation fault 1 | foo() { __asm__("" : : "m"(({}))); } |~^~~ 0xf28613 crash_signal /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/toplev.c:328 0xc0eb94 is_gimple_variable /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.h:84 0xc0eb94 is_gimple_id /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.h:95 0xc0eb94 is_gimple_addressable /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.h:122 0xc0eb94 is_gimple_lvalue(tree_node*) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimple-expr.c:595 0xc4c06d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:15179 0xc59038 gimplify_asm_expr /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:6497 0xc4bfb1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:14556 0xc4db2a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:6869 0xc4e35e gimplify_bind_expr /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:1426 0xc4b33c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:14424 0xc4db2a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:6869 0xc4f153 gimplify_body(tree_node*, bool) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:15456 0xc4f5a1 gimplify_function_tree(tree_node*) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/gimplify.c:15610 0xaa2657 cgraph_node::analyze() /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cgraphunit.c:670 0xaa5531 analyze_functions /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cgraphunit.c:1234 0xaa6011 symbol_table::finalize_compilation_unit() /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/cgraphunit.c:2508 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
[Bug c++/41518] copy initialization of volatile objects
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41518 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |4.9.1 Status|NEW |RESOLVED --- Comment #6 from Andrew Pinski --- Fixed in GCC 4.9.1.
[Bug c++/32385] g++ rejects struct in default argument of template function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32385 --- Comment #8 from Andrew Pinski --- clang also rejects this: :3:34: error: 'A::(unnamed struct at :3:34)' cannot be defined in a type specifier template void foo(int = ((struct { int i; }) {0}).i); ^ :3:57: error: member reference base type 'void' is not a structure or union template void foo(int = ((struct { int i; }) {0}).i); ~^~ 2 errors generated.
[Bug c++/43561] Default argument of nested template function causes a compile-time error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43561 Andrew Pinski changed: What|Removed |Added Known to fail|| --- Comment #2 from Andrew Pinski --- GCC might be correct here. This is what clang gives :3:30: error: recursive evaluation of default argument static bool set(T x, bool b = true) { return b; } ^ :7:22: note: in instantiation of template class 'O::B' requested here struct D: public B {}; ^ :4:42: note: default argument used here static const bool sized = sizeof(set(T())) == 0; // line 5 ^ :13:7: error: no member named 'set' in 'O::D' d.set(1); ~ ^
[Bug c++/39328] ambiguous implicit declaration of template friend function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39328 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Target Milestone|--- |6.2 Known to fail|| --- Comment #2 from Andrew Pinski --- Fixed in GCC 6.2.
[Bug c++/19501] Redundant "template" keyword rejected
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19501 --- Comment #2 from Andrew Pinski --- For the first case, GCC 11 accepts it finally. For the second case, GCC 11 accepts it only for -std=c++20 . clang accepts both cases even for -std=c++98.
[Bug c++/17000] parse error calling member template function of non-lvalue from within template class member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17000 Andrew Pinski changed: What|Removed |Added Known to fail|| --- Comment #11 from Andrew Pinski --- clang also rejects this code for the same reason as GCC.
[Bug c++/96652] Segmentation fault with instantiate_class_template_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96652 Andrew Pinski changed: What|Removed |Added CC||nicholas.muggio at sdl dot usu.edu --- Comment #4 from Andrew Pinski --- *** Bug 94534 has been marked as a duplicate of this bug. ***
[Bug c++/94534] ICE declaring unnamed nested struct as friend
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94534 Andrew Pinski changed: What|Removed |Added Resolution|FIXED |DUPLICATE --- Comment #3 from Andrew Pinski --- Dup of bug 96652 which committed a testcase. *** This bug has been marked as a duplicate of bug 96652 ***
[Bug c++/94534] ICE declaring unnamed nested struct as friend
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94534 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #2 from Andrew Pinski --- Fixed in GCC 11.
[Bug c++/67491] [meta-bug] concepts issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 Bug 67491 depends on bug 79419, which changed state. Bug 79419 Summary: [concepts] Explicit specialization of constrained member template: ICE in set_constraints https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79419 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug c++/79419] [concepts] Explicit specialization of constrained member template: ICE in set_constraints
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79419 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|--- |11.0 Status|NEW |RESOLVED --- Comment #3 from Andrew Pinski --- Fixed for GCC 11.
[Bug c++/67491] [meta-bug] concepts issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 Bug 67491 depends on bug 85991, which changed state. Bug 85991 Summary: [Concepts] Template placeholder: ICE cp_parser_lookup_name, at cp/parser.c:26223 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85991 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug c++/85991] [Concepts] Template placeholder: ICE cp_parser_lookup_name, at cp/parser.c:26223
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85991 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Target Milestone|--- |9.0 Resolution|--- |FIXED --- Comment #2 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #1) > No ICE with current trunk: Using -std=c++17 -fconcepts (as the syntax for concepts slightly changed): :3:10: error: 'TmplC' does not constrain a type 3 | void f(A> *); | ^~~ :1:56: note: concept defined here 1 | template class, int> concept bool TmplC = true; |^ :3:10: error: wrong number of template arguments (1, should be 2) 3 | void f(A> *); | ^~~ :1:56: note: provided for 'template class, int > concept const bool TmplC< , >' 1 | template class, int> concept bool TmplC = true; |^ :3:10: error: wrong number of template arguments (1, should be 2) 3 | void f(A> *); | ^~~ :1:56: note: provided for 'template class, int > concept const bool TmplC< , >' 1 | template class, int> concept bool TmplC = true; |^ :3:17: error: template argument 1 is invalid 3 | void f(A> *); | ^~ Compiler returned: 1 So I think we can close this as fixed. I could not reproduce the ICE in released version of GCC 9.1 either.
[Bug c++/86000] ICE with requires statement in a non constexpr if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86000 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |10.0
[Bug c++/67491] [meta-bug] concepts issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 Bug 67491 depends on bug 86000, which changed state. Bug 86000 Summary: ICE with requires statement in a non constexpr if https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86000 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug c++/86000] ICE with requires statement in a non constexpr if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86000 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Andrew Pinski --- Fixed in GCC 10.
[Bug c++/68608] [concepts] ICE with explicit class instantiation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68608 --- Comment #2 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #1) > Still ICEs on current trunk with -std=c++17 -fconcepts, and also with > -std=c++2a after modernising the code: I can't get this to crash with r12-2133. But the funny thing is clang crashes with a similar issue as what GCC had: :6:7: error: definition with same mangled name '_ZN1AIiE1fEv' as another definition int f() requires (!C) { return 2; } ^ :5:7: note: previous definition is here int f() requires C { return 1; } ^
[Bug c++/70037] [concepts] comdat group error and an ICE with a conceptified tuple implementation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70037 --- Comment #5 from Andrew Pinski --- Is there an updated preprocessed source somewhere as I get a lot of: expression must be enclosed in parentheses For the concepts.
[Bug c++/89011] member function pointer template argument with initialization by constant generates ICE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89011 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|WAITING |RESOLVED --- Comment #4 from Andrew Pinski --- I cannot reproduce the ICE in any version of GCC I tried even GCC 5.1.0.
[Bug c++/87774] ICE on ternary expression with __builtin_fprintf
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87774 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-24 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- Confirmed. Clang requires builtin functions to be directly called: :7:9: error: builtin functions must be directly called (fp ? __builtin_fprintf : ff)(fp, "abc"); ^
[Bug c++/22354] g++ accepts specialization without declaration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22354 Andrew Pinski changed: What|Removed |Added CC||pogonyshev at gmx dot net --- Comment #5 from Andrew Pinski --- *** Bug 43368 has been marked as a duplicate of this bug. ***
[Bug c++/43368] different access to templated structure static field give different results
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43368 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Known to fail|| Resolution|--- |DUPLICATE --- Comment #6 from Andrew Pinski --- This is a dup of bug 22354. *** This bug has been marked as a duplicate of bug 22354 ***
[Bug c++/28985] [DR 399] class member access using a qualified-id fails to check for match of classes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28985 Andrew Pinski changed: What|Removed |Added Status|SUSPENDED |NEW Known to work|| Known to fail|| --- Comment #8 from Andrew Pinski --- [Accepted at the November, 2020 meeting as part of paper P1787R6 and moved to DR at the February, 2021 meeting.]
[Bug c++/29556] Expect error when 'using namespace std' is declared when std namespace is not defined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29556 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic Known to fail|| Last reconfirmed|2006-10-23 00:48:57 |2021-7-23 --- Comment #2 from Andrew Pinski --- We should at least warn this is an extension like clang does: :1:17: warning: using directive refers to implicitly-defined namespace 'std'
[Bug c++/19965] Invalid member declaration diagnosed late
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19965 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |10.0 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- Fixed since GCC 10. :3:9: error: name 'A< >' has incomplete type 3 | A : 2; | ^
[Bug c++/25322] ISO compliance of defining structs in anonymous unions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25322 Andrew Pinski changed: What|Removed |Added Known to fail|| Resolution|--- |FIXED Status|NEW |RESOLVED Target Milestone|--- |12.0 --- Comment #5 from Andrew Pinski --- Fixed for GCC 12 by r12-298; there is a testcase already.
[Bug c/101607] New: ICE on compilable code: in assign_stack_temp_for_type, at function.c:798
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101607 Bug ID: 101607 Summary: ICE on compilable code: in assign_stack_temp_for_type, at function.c:798 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210723 (experimental) [master revision :3eeaf64a5:01ac2f08b0105a1c85425d0e59216eb528c6d2ab] (GCC) $ cat mutant.c union { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { struct { int u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } u2s_a, u2s_b, u2s_c, u2s_d, u2s_e } } fu2(); unions() { fu2(); } $ gcc-trunk -w mutant.c during RTL pass: expand mutant.c: In function ‘unions’: mutant.c:64:12: internal compiler error: in assign_stack_temp_for_type, at function.c:798 64 | unions() { fu2(); } |^ 0x6d9257 assign_stack_temp_for_type(machine_mode, poly_int<1u, long>, tree_node*) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/function.c:798 0xbf47bb assign_temp(tree_node*, int, int) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/function.c:1018 0xa449ff expand_call(tree_node*, rtx_def*, int) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/calls.c:3882 0xb82f85 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /tmp/tmp.7yrVYtTGDZ-gcc-builder/gcc/gcc/expr.c:11443 0xa5d5bf expand_expr /tmp/tmp.7yrVYtTG
[Bug c++/89389] inlining failed in call to always_inline -- removing attribute leaves function inlined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89389 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski --- No testcase in over 2 years so closing as invalid.
[Bug c++/89553] "static const double x = 2" is treated equivalent to "static constexpr double x = 2"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89553 Andrew Pinski changed: What|Removed |Added Blocks||55004 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2021-07-23 --- Comment #1 from Andrew Pinski --- Confirmed. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 [Bug 55004] [meta-bug] constexpr issues
[Bug c++/87497] constexprs involving non-literal const variables are incorrectly accepted
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87497 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Blocks||55004 Status|UNCONFIRMED |NEW Last reconfirmed||2021-07-23 --- Comment #1 from Andrew Pinski --- Confirmed. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 [Bug 55004] [meta-bug] constexpr issues
[Bug c++/79189] Poor code generation when using stateless lambda instead of normal function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79189 Andrew Pinski changed: What|Removed |Added Depends on||4131 --- Comment #3 from Andrew Pinski --- The problem for <=c++14 is: void _GLOBAL__sub_I_main () { : vtable.increment = _FUN; return; } Which is PR 4131. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=4131 [Bug 4131] The C++ compiler doesn't place a const class object to ".rodata" section with non trivial constructor
[Bug c++/86032] non standard copy operator is used for empty class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86032 Andrew Pinski changed: What|Removed |Added Known to fail||4.5.3, 4.7.1 Known to work||4.4.7 --- Comment #2 from Andrew Pinski --- Broke between 4.4.7 and 4.5.3.
[Bug c++/86032] non standard copy operator is used for empty class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86032 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords||wrong-code Last reconfirmed||2021-07-23 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed. Here is a run time test: struct Empty { Empty& operator=(const Empty&) = default; }; template class ShowType; template<> struct ShowType{int t = 0;}; template<> struct ShowType{int t = 1;}; int main() { ShowType example; return example.t; } CUT A compile time test would just remove ShowType specialization.
[Bug c++/85680] Missed optimization for value-init of variable-sized allocation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85680 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement --- Comment #6 from Andrew Pinski --- clang does two memset calls too but with the cheat can remove the second memset.
[Bug c++/85809] SFINAE code compiles that shouldn't be able to compile.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85809 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.0 --- Comment #2 from Andrew Pinski --- Fixed in GCC 9.0. In file included from :1: /opt/compiler-explorer/gcc-9.1.0/include/c++/9.1.0/type_traits: In substitution of 'template using enable_if_t = typename std::enable_if::type [with bool _Cond = (0 == 1); _Tp = float]': :20:10: required from 'class MyClass' :27:26: required from here /opt/compiler-explorer/gcc-9.1.0/include/c++/9.1.0/type_traits:2426:11: error: no type named 'type' in 'struct std::enable_if' 2426 | using enable_if_t = typename enable_if<_Cond, _Tp>::type; | ^~~ ASM generation compiler returned: 1 - The original testcase: #include enum MyEnum { FOO, BAR }; template void do_stuff(std::enable_if_t a) { /*do foo logic*/ } template void do_stuff(std::enable_if_t a) { /*do bar logic*/ } template class MyClass { public: void go(std::enable_if_t) {} void go(std::enable_if_t) {} }; int main() { do_stuff(2.f); // Comment this line out and it doesn't compile anymore. MyClass q; q.go(1); }
[Bug tree-optimization/101606] New: std::sort generates different function for __gnu_cxx::__normal_iterator and int*
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101606 Bug ID: 101606 Summary: std::sort generates different function for __gnu_cxx::__normal_iterator and int* Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: unlvsur at live dot com Target Milestone: --- GCC generates more instructions for vector iterator and int* https://godbolt.org/z/GYGszqsG3 https://godbolt.org/z/oz98vTd94 https://godbolt.org/z/nzTTTz38P I guess this breaks lto that can merge these two functions???
[Bug c++/85104] double underline in a C++ error: duplicate const
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85104 --- Comment #2 from Andrew Pinski --- Most likely we are trying to underline the other const but for some reason it has the wrong location.
[Bug c++/85104] double underline in a C++ error: duplicate const
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85104 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-23 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- Confirmed.
[Bug c++/84692] Class template argument deduction ICE for template's member template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84692 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |7.4 Resolution|--- |FIXED Keywords|ice-on-invalid-code |ice-on-valid-code Status|UNCONFIRMED |RESOLVED --- Comment #3 from Andrew Pinski --- GCC stopped ICEing for 7.4. clang still rejects it: :9:7: error: no viable constructor or deduction guide for deduction of template arguments of 'Y' Y{0, Ts{}...}; ^ :14:3: note: in instantiation of member function 'begin' requested here begin(X{}); ^ :4:12: note: candidate function template not viable: requires 1 argument, but 2 were provided struct Y { ^ :4:12: note: candidate function template not viable: requires 0 arguments, but 2 were provided 1 error generated. I really think clang is wrong, it must not be handling constructor correctly.
[Bug c++/84297] ICE (mmap: Invalid argument) in std::is_trivially_constructible
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84297 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.3 Keywords||ice-on-valid-code --- Comment #3 from Andrew Pinski --- Fixed in GCC 9.3; most likely by the patch which fixed PR 93286.
[Bug tree-optimization/54011] missed optimization opportunities for bool struct/class members
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54011 Andrew Pinski changed: What|Removed |Added Component|c++ |tree-optimization Status|UNCONFIRMED |RESOLVED Target Milestone|--- |8.0 Resolution|--- |FIXED Keywords||missed-optimization --- Comment #3 from Andrew Pinski --- Fixed in GCC 8 and above.
[Bug c++/55004] [meta-bug] constexpr issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 Bug 55004 depends on bug 83928, which changed state. Bug 83928 Summary: implicit conversion of literal class type to unscoped enumeration can not be used as array size https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83928 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug c++/83928] implicit conversion of literal class type to unscoped enumeration can not be used as array size
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83928 Andrew Pinski changed: What|Removed |Added Blocks||55004 Resolution|--- |FIXED Target Milestone|--- |8.0 Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- Fixed in GCC 8 and above so closing. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004 [Bug 55004] [meta-bug] constexpr issues
[Bug c++/83484] constexpr not evaluated at compile time
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83484 --- Comment #5 from Andrew Pinski --- Clang gives (which does not make sense at all): :12:46: error: declaration of constexpr static data member 'High' requires an initializer template<> constexpr Port<7>::Value Port<7>::High; ^ :13:46: error: declaration of constexpr static data member 'Low' requires an initializer template<> constexpr Port<7>::Value Port<7>::Low; ^ 2 errors generated. Of course with -std=c++20 clang gies a reasonable error message: source>:12:46: error: inline variable 'Port<7>::High' is not defined template<> constexpr Port<7>::Value Port<7>::High; ^ :18:7: note: used here if (High == value) ^ :13:46: error: inline variable 'Port<7>::Low' is not defined template<> constexpr Port<7>::Value Port<7>::Low; ^ :26:26: note: used here Port<7>::set (Port<7>::Low); ^
[Bug c++/83144] ICE using trailing return type and constexpr with GCC 7.X
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83144 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=91933 Keywords||ice-on-valid-code --- Comment #2 from Andrew Pinski --- Related to PR 91933 but definitely not the same as this one is still not fixed on the trunk.
[Bug c++/82791] Inconsistency with member function pointer access
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82791 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-23 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords||accepts-invalid --- Comment #1 from Andrew Pinski --- With -pedantic-errors only: auto foo = typeid(obj.*mfp).name(); //returns "void ()" is accepted. The rest is not. GCC does have an extension converting PMF to a pointer function which is definitely happening here.
[Bug middle-end/101600] [12 Regression] Spurious -Warray-bounds downcasting a polymorphic pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101600 --- Comment #2 from Martin Sebor --- There's another bug here that can be reproduced with the following slightly modified version of the original test case: $ cat pr101600-c2.C && /build/gcc-master/gcc/xgcc -B /build/gcc-master/gcc -O2 -S -Wall pr101600-c2.C struct S1 { virtual ~S1(); }; struct S2 { int m; }; struct S3 { virtual ~S3(); }; struct S4: S1, S2, S3 {}; int f1(); void f2 (S3 *); S4 s4; void f3 (void) { S2 *p = &s4; for (int i = f1(); f1();) { if (i == 0) { p = nullptr; break; } } f2 (static_cast(p)); } pr101600-c2.C: In function ‘void f3()’: pr101600-c2.C:25:6: warning: array subscript 0 is outside array bounds of ‘S2 [2305843009213693951]’ [-Warray-bounds] 25 | f2 (static_cast(p)); | ~~~^~ pr101600-c2.C:4:8: note: at offset -8 into object ‘S4::’ of size 4 4 | struct S4: S1, S2, S3 {}; |^~ A simpler (but contrived) C test case goes something like this: $ cat u.c && gcc -O2 -S -Wall u.c struct A { int i, j; } a; int f (void); void g (int); void h (void) { void *p = &a.j; for (int i = f (); f (); ) if (!i) { p = 0; break; } int o = __builtin_offsetof (struct A, j); struct A *q = (struct A*)((char*)p - o); g (q->i); } u.c: In function ‘h’: u.c:20:7: warning: array subscript 0 is outside array bounds of ‘void[9223372036854775807]’ [-Warray-bounds] 20 | g (q->i); | ^~ u.c:1:19: note: at offset -4 into object ‘j’ of size 4 1 | struct A { int i, j; } a; | ^
[Bug c++/82125] Suboptimal error message for range-based for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82125 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2017-09-07 00:00:00 |2021-7-23 --- Comment #2 from Andrew Pinski --- clang gives a reasonable error message: :4:20: error: invalid range expression of type 'int *const'; no viable 'begin' function available for(auto e : r) {} ^ ~ 1 error generated. ASM generation compiler returned: 1
[Bug c++/65132] diagnostics: missing: bitfield member cannot have an in-class initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65132 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |8.0 Resolution|--- |FIXED --- Comment #4 from Andrew Pinski --- Fixed in GCC 8.0. C++20 added support for this feature and GCC enables it as an extension for C++11+ with a warning: :1:19: warning: default member initializers for bit-fields only available with -std=c++2a or -std=gnu++2a class C { bool x:1=false; }; ^ ASM generation compiler returned: 0 :1:19: warning: default member initializers for bit-fields only available with -std=c++2a or -std=gnu++2a class C { bool x:1=false; }; ^
[Bug c++/94951] [8/9 Regression] dereferencing type-punned pointer will break strict-aliasing rules when using super class for a template type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94951 Andrew Pinski changed: What|Removed |Added CC||rrrlasse at hotmail dot com --- Comment #11 from Andrew Pinski --- *** Bug 81152 has been marked as a duplicate of this bug. ***
[Bug c++/81152] False strict-aliasing warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81152 Andrew Pinski changed: What|Removed |Added Resolution|FIXED |DUPLICATE --- Comment #4 from Andrew Pinski --- Actually this is a dup of bug 94951. *** This bug has been marked as a duplicate of bug 94951 ***
[Bug c++/101603] [meta-bug] pointer to member functions issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603 Bug 101603 depends on bug 89960, which changed state. Bug 89960 Summary: Implicit derived to base conversion considered type punning. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89960 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE
[Bug c++/86922] Invoking templated PTMF on subclass gives false strict-aliasing warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86922 Andrew Pinski changed: What|Removed |Added CC||cassio.neri at gmail dot com --- Comment #2 from Andrew Pinski --- *** Bug 89960 has been marked as a duplicate of this bug. ***
[Bug c++/89960] Implicit derived to base conversion considered type punning.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89960 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Andrew Pinski --- This is a dup of bug 86922. *** This bug has been marked as a duplicate of bug 86922 ***
[Bug c++/81152] False strict-aliasing warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81152 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic Resolution|--- |FIXED Target Milestone|--- |8.5 Status|NEW |RESOLVED --- Comment #3 from Andrew Pinski --- Fixed in GCC 8.5 and above.
[Bug middle-end/101600] [12 Regression] Spurious -Warray-bounds downcasting a polymorphic pointer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101600 Martin Sebor changed: What|Removed |Added Blocks||56456 Target Milestone|--- |12.0 Ever confirmed|0 |1 CC||msebor at gcc dot gnu.org Last reconfirmed||2021-07-23 Summary|Spurious -Warray-bounds |[12 Regression] Spurious ||-Warray-bounds downcasting ||a polymorphic pointer Known to work||11.1.0 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Status|UNCONFIRMED |ASSIGNED Known to fail||12.0 --- Comment #1 from Martin Sebor --- Thanks for the small test case! I can confirm the false positive. The IL looks (close to) the following: [local count: 80404472]: # p_1 = PHI if (p_1 != 0B) goto ; [100.00%] else goto ; [0.00%] [local count: 80404472]: iftmp.1_11 = &MEM[(struct S4 *)p_1 + -8B].D.2419; <<< -Warray-bounds except that p_1 is: p_1 = PHI <0B(3), p_9(D)(4)> The bug is in access_ref::get_ref () in not clearing the base0 flag, making -Warray-bounds think the pointer points to the first byte of a declared object. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 [Bug 56456] [meta-bug] bogus/missing -Warray-bounds
[Bug c++/78280] GCC incorrectly accepts assignment in bitfield width
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78280 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Target Milestone|--- |8.0 --- Comment #2 from Andrew Pinski --- Fixed when C++20 support for default member initializers for bit-fields was added.
[Bug c++/78949] incorrect "unused variable" warning with SSE2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78949 Andrew Pinski changed: What|Removed |Added CC||zoltan at hidvegi dot com --- Comment #11 from Andrew Pinski --- *** Bug 78246 has been marked as a duplicate of this bug. ***
[Bug c++/78246] Incorrect vector variable set but not used warning
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78246 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #3 from Andrew Pinski --- Fixed and is a dup of bug 78949. *** This bug has been marked as a duplicate of bug 78949 ***
[Bug c++/77601] error: cannot convert 'is_same' to 'const bool' in initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77601 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |6.4 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski --- Fixed in GCC 6.4 and above.
[Bug c++/58040] Cannot take address-of public using-declaration of member from protected base class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58040 --- Comment #6 from Andrew Pinski --- clang fails the same way.
[Bug c++/101603] [meta-bug] pointer to member functions issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603 Bug 101603 depends on bug 69375, which changed state. Bug 69375 Summary: GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const" https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE
[Bug c++/52099] Incorrectly applying conversion when catching pointer-to-members
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52099 Andrew Pinski changed: What|Removed |Added CC||eric at efcs dot ca --- Comment #1 from Andrew Pinski --- *** Bug 69375 has been marked as a duplicate of this bug. ***
[Bug c++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #6 from Andrew Pinski --- Dup of bug 52099. *** This bug has been marked as a duplicate of bug 52099 ***
[Bug target/56337] __attribute__((aligned(N))) breaks for N=1<<28
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56337 Andrew Pinski changed: What|Removed |Added Keywords||patch URL||https://gcc.gnu.org/piperma ||il/gcc-patches/2021-July/57 ||5967.html --- Comment #5 from Andrew Pinski --- Patch submitted: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575967.html
[Bug c++/98038] ICE on invalid trying to recursively invoke a lambda object with operator()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98038 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Target Milestone|--- |10.3 --- Comment #3 from Andrew Pinski --- Fixed already. : In instantiation of 'my_mem_fn(int (Dummy::*)() const):: [with U = std::reference_wrapper; ARGS = {}]': :32:13: required from here :17:30: error: 'operator()' not defined 17 | return operator()(pmf, p.get(), std::forward(args)...); | ~~^~~ ASM generation compiler returned: 1 : In instantiation of 'my_mem_fn(int (Dummy::*)() const):: [with U = std::reference_wrapper; ARGS = {}]': :32:13: required from here :17:30: error: 'operator()' not defined 17 | return operator()(pmf, p.get(), std::forward(args)...); | ~~^~~ Execution build compiler returned: 1
[Bug c++/78609] invalid member's visibility detection in constexpr with arrays
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78609 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-07-23 Summary|invalid member's visibility |invalid member's visibility |detection in constexpr |detection in constexpr with ||arrays Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #3 from Andrew Pinski --- Confirmed. The problem is with taking the address of a field and templates. Here is a reduced testcase: struct A { private: char data; public: constexpr const char *c_str() const { return &data; } constexpr A(char const str) : data(str) {}; constexpr A() : data() {}; }; template struct B { static const constexpr A name = A{'a'}; static const constexpr char * value = name.c_str(); }; template const constexpr A B::name; const char *c = B<0>::value; CUT If I make B a non-template, then it will work correctly.
[Bug c++/101603] [meta-bug] pointer to member functions issues
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603 Bug 101603 depends on bug 80575, which changed state. Bug 80575 Summary: unnecessary virtual function table support in member function call https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80575 What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
[Bug c++/80575] unnecessary virtual function table support in member function call
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80575 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |10.0 Resolution|--- |FIXED Blocks||101603 Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- Fixed in GCC 10. Most likely fixed by r10-1332. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603 [Bug 101603] [meta-bug] pointer to member functions issues
[Bug fortran/96711] Internal Compiler Error on NINT() Function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96711 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|anlauf at gcc dot gnu.org |unassigned at gcc dot gnu.org