[Bug c++/118719] [15 regression] Spurious -Wc++20-extensions warning emitted when capturing a structured binding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118719 --- Comment #5 from Jonathan Wakely --- More generally, [X/Y/Z Regression] means a regression present in the X.x, Y.x and Z.x release series. The 'Known to work' and 'Known to fail' fields can be used to provide more specific information about which versions worked before the regression.
[Bug ada/64869] "use all type" clause is ineffective
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64869 --- Comment #5 from Eric Botcazou --- The problem is in Freeze.Freeze_Before: -- If the entity is a type declared in an inner package, it may be -- frozen by an outer declaration before the package itself is -- frozen. Install the package scope to analyze the freeze nodes, -- which may include generated subprograms such as predicate -- functions, etc. if Is_Type (T) and then From_Nested_Package (T) then Push_Scope (Pack); Install_Visible_Declarations (Pack); Install_Private_Declarations (Pack); Insert_Actions (N, Freeze_Nodes); End_Package_Scope (Pack); else Insert_Actions (N, Freeze_Nodes); end if; where End_Package_Scope resets the visibility of the type T.
[Bug c++/85889] lambda expression can capture structured bindings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889 --- Comment #16 from Jonathan Wakely --- (In reply to Jakub Jelinek from comment #12) > (In reply to Jonathan Wakely from comment #0) > > [expr.prim.lambda.capture] p8 says "If a lambda-expression explicitly > > captures an entity that is not odr-usable or captures a structured binding > > (explicitly or implicitly), the program is ill-formed." > > Is that something that was really in C++17? > That wording isn't in n4660.pdf and git blame seems to suggest it came from > P0588R1 which was a C++20 paper. It was approved as a Defect Report at the Nov 2017 Albuquerque meeting: "Move to accept the changes in P0588R1 (Simplifying implicit lambda capture) as a Defect Report and apply them to the C++ working paper."
[Bug ada/64869] "use all type" clause is ineffective
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64869 --- Comment #6 from Eric Botcazou --- In fact this should be dealt with in Uninstall_Declarations: -- On exit from the package scope, we must preserve the visibility -- established by use clauses in the current scope. Two cases: -- a) If the entity is an operator, it may be a primitive operator of -- a type for which there is a visible use-type clause. -- b) For other entities, their use-visibility is determined by a -- visible use clause for the package itself or a use-all-type clause -- applied directly to the entity's type. For a generic instance, -- the instantiation of the formals appears in the visible part, -- but the formals are private and remain so.
[Bug ada/64869] "use all type" clause is ineffective
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64869 Eric Botcazou changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org --- Comment #7 from Eric Botcazou --- Fixing.
[Bug c++/85889] lambda expression can capture structured bindings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889 --- Comment #17 from Jonathan Wakely --- (In reply to Ville Voutilainen from comment #5) > And the papers that changed this are > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1091r3.html and > https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1381r1.html These were approved in Feb 2019 Kona meeting, but not as DRs: Move to apply the changes in P1091R3 (Extending structured bindings to be more like variable declarations) to the C++ working paper. [Note that this paper is modified by the next motion.] Move to apply the changes in P1381R1 (Reference capture of structured bindings) to the C++ working paper. [Note that this paper assumes that the preceding motion passes.] It's a little surprising that these weren't DRs if they were supposed to fix problems introduced by P0588R1, which was a DR.
[Bug c++/43720] undefined reference to static const integral class member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43720 mauro russo changed: What|Removed |Added CC||ing.russomauro at gmail dot com --- Comment #4 from mauro russo --- also dup of (rejected) Bug 25220
[Bug c++/25220] [g++] (in class) static (const integral) member initialization.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25220 mauro russo changed: What|Removed |Added CC||ing.russomauro at gmail dot com --- Comment #4 from mauro russo --- hi all, it seems that now gcc 14.2 accepts this code, and the same do Clang and MVSC, but in C++20 standard I still read from [class.static.data]: p3: The declaration of a non-inline static data member in its class definition is not a definition and may be of an incomplete type other than cv void. The definition for a static data member that is not defined inline in the class definition shall appear in a namespace scope enclosing the member’s class definition. ... P4: If a non-volatile non-inline const static data member is of integral or enumeration type, its declaration in the class definition can specify a brace-or-equal-initializer in which every initializer-clause that is an assignment-expression is a constant expression. The member shall still be defined in a namespace scope if it is odr-used in the program and the namespace scope definition shall not contain an initializer . ... I was looking for existing bugs and found this old one that was correctly rejected.
[Bug c++/118722] New: accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 Bug ID: 118722 Summary: accepted undefined static integral data member Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ing.russomauro at gmail dot com Target Milestone: --- hello, I wonder the following code (https://godbolt.org/z/fj7Mo8Ynx) is accepted by gcc 14.2 (and also Clang 19.0 and MVSC v19); #include struct T{ static const int x = 1; }; //const int T::x; int main (){ std::cout << T::x << std::endl; } >From C++20 standard I still read in [class.static.data]: p3: The declaration of a non-inline static data member in its class definition is not a definition and may be of an incomplete type other than cv void. The definition for a static data member that is not defined inline in the class definition shall appear in a namespace scope enclosing the member’s class definition. ... P4: If a non-volatile non-inline const static data member is of integral or enumeration type, its declaration in the class definition can specify a brace-or-equal-initializer in which every initializer-clause that is an assignment-expression is a constant expression. The member shall still be defined in a namespace scope if it is odr-used in the program and the namespace scope definition shall not contain an initializer . ... I also noticed in the past there were bugs correctly rejected where sample code missed the definition out of the class, while users wondered about linking error, e.g. PR 25220, PR 43720, etc. Am I missing some detail ?
[Bug c++/115190] -fmodule-mapper does not accept CRLF files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115190 Nathaniel Shead changed: What|Removed |Added Last reconfirmed||2025-02-02 Assignee|unassigned at gcc dot gnu.org |nshead at gcc dot gnu.org Ever confirmed|0 |1 CC||nshead at gcc dot gnu.org Status|UNCONFIRMED |NEW --- Comment #9 from Nathaniel Shead --- Created attachment 60351 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60351&action=edit potential fix Confirmed. There's actually two separate errors here depending on whether `MAPPED_READING` is defined. When using mmap, any '\r' are treated as normal characters, and so e.g. a modmap with 'test test.gcm\r\n' would (attempt) to output to a module file 'test.gcm\r'; this would work fine on Linux (or WSL), but Windows forbids control characters in filenames. When not using mmap, since the file descriptor is opened in text mode (in module_client::open_module_client), as noted in comment #7 the size of the read may not match the size of the file. In general I'm not convinced that mmap is super appropriate for this case where we're reading a file in once, start-to-finish. So maybe the way to go is to remove the mmap case to reduce complexity and fix the assumption on file size, like the attached. But maybe it'd even be worth handling '\r' in module mapper files on Linux (e.g. if copied from Windows?)
[Bug c++/118723] internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3346
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118723 --- Comment #4 from Ran Regev --- The log/compiled file can be found here: https://github.com/regevran/scylladb/blob/scylla-contracts/logs/cc0pdb3w.out.xz
[Bug c++/118726] [12/13/14/15 Regression] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O1+ level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Andrew Pinski changed: What|Removed |Added Component|tree-optimization |c++ --- Comment #5 from Andrew Pinski --- d ={v} {CLOBBER}; d.4_14 = d; l_15 = d.4_14 + 1; This makes it seems like d is in the wrong scope. I wonder if you could make a testcase using class constructors/deconstructors to show it is the wrong location ...
[Bug c++/118723] internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3346
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118723 --- Comment #5 from Ran Regev --- I can confirm that the following change removed the ICE (i.e now there is no such error): git diff main.cc diff --git a/main.cc b/main.cc index 3802966626..69e54675a8 100644 --- a/main.cc +++ b/main.cc @@ -245,13 +245,15 @@ static future<> read_object_storage_config(db::config& db_cfg) { std::unordered_map cfg; YAML::Node doc = YAML::Load(data.c_str()); -for (auto&& section : doc) { -auto sec_name = section.first.as(); + + +for (auto&& docIt = doc.begin(); docIt != doc.end(); ++docIt) { +auto sec_name = docIt->first.as(); if (sec_name != "endpoints") { co_await coroutine::return_exception(std::runtime_error(fmt::format("While parsing object_storage config: section {} currently unsupported.", sec_name))); } -auto endpoints = section.second.as>(); +auto endpoints = docIt->second.as>(); for (auto&& ep : endpoints) { cfg[ep.endpoint] = std::move(ep.config); }
[Bug c++/118726] [12/13/14/15 Regression] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O1+ level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Andrew Pinski changed: What|Removed |Added Attachment #60352|0 |1 is obsolete|| --- Comment #6 from Andrew Pinski --- Created attachment 60353 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60353&action=edit Better testcase This one fails even at -O0.
[Bug c++/118726] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Andrew Pinski changed: What|Removed |Added Attachment #60353|0 |1 is obsolete|| --- Comment #7 from Andrew Pinski --- Created attachment 60354 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60354&action=edit fixedup testcase
[Bug c++/118726] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Andrew Pinski changed: What|Removed |Added Keywords|needs-bisection | --- Comment #8 from Andrew Pinski --- I don;'t think this is a regression.
[Bug c++/118726] deconstructor for variable definition in the condition of a for loop is too soon
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 --- Comment #9 from Andrew Pinski --- Note the only reason why the original testcase was shows up as a regression is due to GCC 5 adding a lifetime markers in the same location as dtors would be called for scalars that are in memory.
[Bug c++/118726] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O2 level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 --- Comment #2 from xiaohuba2021 --- There is a typo in the code mentioned above. The correct version is: ``` #include int main() { volatile int x = 10; for (int l = 1; int d = x - l; l = d + 1) { int &z = d; std::cout << z << '\n'; } } ```
[Bug c++/118726] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O2 level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 --- Comment #1 from xiaohuba2021 --- upd: the code does not crash, but is killed due to a timeout.
[Bug c++/118726] [12/13/14/15 Regression] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O1+ level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 --- Comment #4 from Andrew Pinski --- Created attachment 60352 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60352&action=edit dejagnuified testcase
[Bug target/68028] [12/13/14/15 regression] Compilation error "lto1: error: target attribute or pragma changes single precision floating point" with LTO on PowerPC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68028 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED Target Milestone|12.5|8.0 --- Comment #23 from Andrew Pinski --- Fixed by r8-6851-g9bbbdb49b4f8b0 . It didn't show up in the comments here as it didn't have the `PR target/68028` in the commit message with the changelog.
[Bug c++/118726] [12/13/14/15 Regression] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O1+ level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2025-02-02 Keywords||needs-bisection Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #3 from Andrew Pinski --- Confirmed. Been failing since GCC 5. I have not looked into why though.
[Bug c++/118726] [12/13/14/15 Regression] GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O1+ level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code Known to fail||14.2.0, 15.0, 5.1.0, 6.1.0, ||9.5.0 Summary|GCC generates wrong code|[12/13/14/15 Regression] |when using non-structured |GCC generates wrong code |binding declaration as the |when using non-structured |condition of a for-loop at |binding declaration as the |O2 level|condition of a for-loop at ||O1+ level Target Milestone|--- |12.5 Known to work||4.8.4, 4.9.3
[Bug c++/118722] accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 Daniel Krügler changed: What|Removed |Added CC||daniel.kruegler@googlemail. ||com --- Comment #1 from Daniel Krügler --- Your program does not require the definition of T::x to exist, because the selected operator<< takes an int, not some reference to it. If you change your program to something like this, a definition is required: struct T{ static const int x = 1; }; const int *p = &T::x; int main (){ return *p; }
[Bug target/117081] [15 Regression] FAIL: gcc.target/i386/pr91384.c since r15-1619-g3b9b8d6cfdf593
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117081 --- Comment #6 from H.J. Lu --- r15-1619-g3b9b8d6cfdf593 changes IRA to increase saving and restoring callee-saved register cost by REG_FREQ_MAX, which is defined as 1000. As the result, IRA avoids using callee-saved registers. For void foo (void); void bar (void); int test (int a) { int r; if (r = -a) foo (); else bar (); return r; } we now generates : 0: 89 f8 mov%edi,%eax 2: 48 83 ec 18 sub$0x18,%rsp 6: f7 d8 neg%eax 8: 89 44 24 0c mov%eax,0xc(%rsp) c: 85 ff test %edi,%edi e: 74 10 je 20 10: e8 00 00 00 00 call 15 15: 8b 44 24 0c mov0xc(%rsp),%eax 19: 48 83 c4 18 add$0x18,%rsp 1d: c3 ret 1e: 66 90 xchg %ax,%ax 20: e8 00 00 00 00 call 25 25: 8b 44 24 0c mov0xc(%rsp),%eax 29: 48 83 c4 18 add$0x18,%rsp 2d: c3 ret instead of : 0: 53 push %rbx 1: 89 fb mov%edi,%ebx 3: f7 db neg%ebx 5: 74 09 je 10 7: e8 00 00 00 00 call c c: 89 d8 mov%ebx,%eax e: 5b pop%rbx f: c3 ret 10: e8 00 00 00 00 call 15 15: 89 d8 mov%ebx,%eax 17: 5b pop%rbx 18: c3 ret callee-saved register, rbx, is used since we need to preserve r across calls. We can't use a caller-saved register for it.
[Bug target/26505] Storing float to int into two different pointers requires stack space
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26505 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |11.0 Resolution|--- |FIXED --- Comment #3 from Andrew Pinski --- Fixed since at least GCC 11 with -mcpu=power9 so closing as fixed.
[Bug rtl-optimization/111673] assign_hard_reg() routine should scale save/restore costs of callee save registers with basic block frequency
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111673 --- Comment #4 from GCC Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:e8262c9041feddd7446840a9532cf458452f3587 commit r15-7321-ge8262c9041feddd7446840a9532cf458452f3587 Author: H.J. Lu Date: Sun Feb 2 06:46:29 2025 +0800 x86: Add a test for PR rtl-optimization/111673 Add a test for the target independent bug, PR rtl-optimization/111673. PR rtl-optimization/111673 * gcc.target/i386/pr111673.c: New file. Signed-off-by: H.J. Lu
[Bug target/118713] -mindirect-branch-register isn't handle for -fno-plt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118713 --- Comment #1 from GCC Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:dd6247cb8fc11a15e23e949092f89d24ff329209 commit r15-7318-gdd6247cb8fc11a15e23e949092f89d24ff329209 Author: H.J. Lu Date: Fri Jan 31 12:29:04 2025 +0800 x86: Handle TARGET_INDIRECT_BRANCH_REGISTER for -fno-plt If TARGET_INDIRECT_BRANCH_REGISTER is true, indirect call and jump should use register, not memory. Update Bs, Bw and Bz constraints to disable indirect call over memmory if TARGET_INDIRECT_BRANCH_REGISTER true, change x32 call over GOT slot to call over register and also disable sibcall over memory. gcc/ PR target/118713 * config/i386/constraints.md (Bs): Always disable if TARGET_INDIRECT_BRANCH_REGISTER is true. (Bw): Likewise. * config/i386/i386-expand.cc (ix86_expand_call): Force indirect call via register for x32 GOT slot call if TARGET_INDIRECT_BRANCH_REGISTER is true. * config/i386/i386-protos.h (ix86_nopic_noplt_attribute_p): New. * config/i386/i386.cc (ix86_nopic_noplt_attribute_p): Make it global. * config/i386/i386.md (*call_got_x32): Disable indirect call via memory for TARGET_INDIRECT_BRANCH_REGISTER. (*call_value_got_x32): Likewise. (*sibcall_value_pop_memory): Likewise. * config/i386/predicates.md (constant_call_address_operand): Return false if both TARGET_INDIRECT_BRANCH_REGISTER and ix86_nopic_noplt_attribute_p are true. gcc/testsuite/ PR target/118713 * gcc.target/i386/pr118713-1-x32.c: New test. * gcc.target/i386/pr118713-1.c: Likewise. * gcc.target/i386/pr118713-2-x32.c: Likewise. * gcc.target/i386/pr118713-2.c: Likewise. * gcc.target/i386/pr118713-3-x32.c: Likewise. * gcc.target/i386/pr118713-3.c: Likewise. * gcc.target/i386/pr118713-4-x32.c: Likewise. * gcc.target/i386/pr118713-4.c: Likewise. * gcc.target/i386/pr118713-5-x32.c: Likewise. * gcc.target/i386/pr118713-5.c: Likewise. * gcc.target/i386/pr118713-6-x32.c: Likewise. * gcc.target/i386/pr118713-6.c: Likewise. * gcc.target/i386/pr118713-7-x32.c: Likewise. * gcc.target/i386/pr118713-7.c: Likewise. * gcc.target/i386/pr118713-8-x32.c: Likewise. * gcc.target/i386/pr118713-8.c: Likewise. * gcc.target/i386/pr118713-9-x32.c: Likewise. * gcc.target/i386/pr118713-9.c: Likewise. * gcc.target/i386/pr118713-10-x32.c: Likewise. * gcc.target/i386/pr118713-10.c: Likewise. * gcc.target/i386/pr118713-11-x32.c: Likewise. * gcc.target/i386/pr118713-11.c: Likewise. * gcc.target/i386/pr118713-12-x32.c: Likewise. * gcc.target/i386/pr118713-12.c: Likewise. Signed-off-by: H.J. Lu
[Bug c++/118723] New: internal compiler error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118723 Bug ID: 118723 Summary: internal compiler error Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: regev.ran at gmail dot com Target Milestone: --- gcc was invoked with: /home/ran/bin/compilers/gcc-trunk/bin/g++ -MD -MT build/dev/main.o -MF build/dev/main.o.d -std=gnu++23 -I/home/ran/dev/scylladb/seastar/include -I/home/ran/dev/scylladb/build/dev/seastar/gen/include -Wno-maybe-uninitialized -Werror=unused-result -fstack-clash-protection -DSEASTAR_P2581R1 -DSEASTAR_API_LEVEL=7 -DSEASTAR_BUILD_SHARED_LIBS -DSEASTAR_SSTRING -DSEASTAR_ENABLE_ALLOC_FAILURE_INJECTION -DSEASTAR_LOGGER_COMPILE_TIME_FMT -DSEASTAR_SCHEDULING_GROUPS_COUNT=19 -DSEASTAR_LOGGER_TYPE_STDOUT -DSEASTAR_TYPE_ERASE_MORE -DFMT_SHARED -I/usr/include/p11-kit-1 -DWITH_GZFILEOP -Wno-changes-meaning -ffile-prefix-map=/home/ran/dev/scylladb=. -DSEASTAR_NO_EXCEPTION_HACK -march=westmere -DDEVEL -DSEASTAR_ENABLE_ALLOC_FAILURE_INJECTION -DSCYLLA_ENABLE_ERROR_INJECTION -DSCYLLA_ENABLE_PREEMPTION_SOURCE -O2 -Wstack-usage=21504 -Wno-error=stack-usage= -DSCYLLA_BUILD_MODE=dev -iquote. -iquote build/dev/gen -std=gnu++23 -Wno-changes-meaning -ffile-prefix-map=/home/ran/dev/scylladb=. -DSEASTAR_NO_EXCEPTION_HACK -march=westmere -DBOOST_ALL_DYN_LINK -fvisibility=hidden -isystem abseil -Wall -Wextra -Wimplicit-fallthrough -Wno-mismatched-tags -Wno-overloaded-virtual -Wno-unused-parameter -Wno-missing-field-initializers -Wno-deprecated-copy -Wno-narrowing -Wno-error=deprecated-declarations -DXXH_PRIVATE_API -DSEASTAR_TESTING_MAIN -freport-bug -c -o The head of the attached zip file: head ccs6MUzo.out // Target: x86_64-pc-linux-gnu // Configured with: ../gcc-trunk/configure --prefix=/home/ran/bin/compilers/gcc-trunk --with-mpfr=/home/ran/compilers/mpfr/ --with-mpc=/home/ran/compilers/mpc/ --with-gmp=/home/ran/compilers/gmp --disable-multilib // Thread model: posix // Supported LTO compression algorithms: zlib zstd // gcc version 15.0.1 20250131 (experimental) (GCC) // // In file included from ./db/config.hh:29, // from transport/server.hh:39, // from main.cc:32: // ./utils/advanced_rpc_compressor.hh: In constructor ‘constexpr utils::compression_algorithm::compression_algorithm(underlying)’: // ./utils/advanced_rpc_compressor.hh:44:15: warning: comparison is always false due to limited range of data type [-Wtype-limits] //44 | if (x < 0 || x >= static_cast(type::COUNT)) { // | ~~^~~ // In file included from /home/ran/dev/scylladb/seastar/include/seastar/core/task.hh:24, // from /home/ran/dev/scylladb/seastar/include/seastar/core/future.hh:36, // from /home/ran/dev/scylladb/seastar/include/seastar/util/closeable.hh:26, // from main.cc:14: // /home/ran/dev/scylladb/seastar/include/seastar/core/scheduling.hh: In instantiation of ‘void seastar::internal::apply_constructor(void*, Tuple, std::index_sequence<_Idx ...>) [with ConstructorType = service::storage_proxy_stats::stats; Tuple = std::tuple<>; long unsigned int ...Idx = {}; std::index_sequence<_Idx ...> = std::integer_sequence]’: // /home/ran/dev/scylladb/seastar/include/seastar/core/scheduling.hh:253:39: required from ‘seastar::scheduling_group_key_config seastar::make_scheduling_group_key_config(ConstructorArgs ...) [with T = service::storage_proxy_stats::stats; ConstructorArgs = {}]’ // 253 | internal::apply_constructor(p, args, std::make_index_sequence()); // | ~~^ // main.cc:1338:90: required from here // 1338 | make_scheduling_group_key_config(); // | ~^~ // /home/ran/dev/scylladb/seastar/include/seastar/core/scheduling.hh:230:54: warning: parameter ‘args’ set but not used [-Wunused-but-set-parameter] // 230 | void apply_constructor(void* pre_alocated_mem, Tuple args, std::index_sequence) { // |~~^~~~ // main.cc: In function ‘void read_object_storage_config(_Z26read_object_storage_configRN2db6configE.Frame*)’: // main.cc:262:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3346 // 262 | } // | ^ // 0x25ccedf internal_error(char const*, ...) // ../../gcc-trunk/gcc/diagnostic-global-context.cc:517 // 0x710093 fancy_abort(char const*, int, char const*) // ../../gcc-trunk/gcc/diagnostic.cc:1722 // 0x54bb01 gimplify_var_or_parm_decl // ../../gcc-trunk/gcc/gimplify.cc:3346 // 0xd4a602 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) // ../../gcc-trunk/gcc/gimplify.cc:19791 //
[Bug target/118713] -mindirect-branch-register isn't handle for -fno-plt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118713 H.J. Lu changed: What|Removed |Added Target Milestone|--- |15.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed||2025-02-01 --- Comment #2 from H.J. Lu --- Fixed for GCC 15.
[Bug c++/118722] accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 --- Comment #2 from mauro russo --- ok, I see now the example in cppreference about special cases where, despite that static data member value is read, it is usable in constant expressions and an lvalue-to-rvalue conversion is applied to it (section "ODR-use (formal definition)" in https://en.cppreference.com/w/cpp/language/definition) Quite tricky.
[Bug c++/25220] [g++] (in class) static (const integral) member initialization.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25220 --- Comment #5 from mauro russo --- found out, through the discussion on PR 118722, that my case falls in the exceptions where there is no odr-use.
[Bug other/116176] SARIF output doesn't yet capture nesting of logical locations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116176 David Malcolm changed: What|Removed |Added Last reconfirmed||2025-02-01 Ever confirmed|0 |1 Target Milestone|--- |16.0 Status|UNCONFIRMED |ASSIGNED --- Comment #2 from David Malcolm --- The patch in comment #1 adds support to sarif-replay for replaying *input* .sarif files that use theRun.logicalLocations (which is the case for those that use parentIndex), but doesn't yet use parentIndex or capture the nesting in the calls it makes to libgdiagnostics. I have a work-in-progress followup patch (for GCC 16) that adds support to gcc's sarif *output* for capturing the tree of logical locations (which thus requires putting the information in theRun.logicalLocations).
[Bug c++/118722] accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 --- Comment #6 from mauro russo --- sure, I was not saying disagreement, just a new point learned :-) Thanks.
[Bug target/118713] -mindirect-branch-register isn't handle for -fno-plt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118713 --- Comment #3 from GCC Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:dceec9efbd19b50ff9e5268b9bc35d5c44b2f6e2 commit r15-7320-gdceec9efbd19b50ff9e5268b9bc35d5c44b2f6e2 Author: H.J. Lu Date: Sun Feb 2 05:46:18 2025 +0800 x86: Change "if (TARGET_X32 ...)" back to "else if (TARGET_X32 ...)" Update commit dd6247cb8fc11a15e23e949092f89d24ff329209 Author: H.J. Lu Date: Fri Jan 31 12:29:04 2025 +0800 x86: Handle TARGET_INDIRECT_BRANCH_REGISTER for -fno-plt to change "if (TARGET_X32 ...)" back to "else if (TARGET_X32 ...)". PR target/118713 * config/i386/i386-expand.cc (ix86_expand_call): Change "if (TARGET_X32 ...)" back to "else if (TARGET_X32 ...)". Signed-off-by: H.J. Lu
[Bug target/117097] [15 Regression] gcc.target/i386/pr63527.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117097 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #2 from H.J. Lu --- It is passing again as of r15-7320.
[Bug fortran/111477] Procedure as actual argument fails against procedure pointer dummy argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111477 --- Comment #3 from anlauf at gcc dot gnu.org --- While gfc-14 rejects the code in comment#1, pr114722-c1.f90:35:22: 35 | test_description = test_description_t(do_something) | 1 Error: Component 'test_function_' at (1) is a PRIVATE component of 'test_description_t' it is accepted by version 15-trunk. There is only a warning when compiling *without* optimization: /usr/bin/ld: warning: /tmp/ccYyIdIU.o: requires executable stack (because the .note.GNU-stack section is executable) Intel, AMD flang and NAG accept the code silently. Nvidia generates an error similar to current gcc-14.
[Bug fortran/118724] [F08] Gfortran rejects passing a procedure as an actual argument to a procedure pointer dummy argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118724 --- Comment #2 from anlauf at gcc dot gnu.org --- Works here with gcc-15. Intel, AMD flang and NAG accept the code silently. Nvidia generates an error similar to current gcc-14. See also pr111477#c3 Can we identify the fix?
[Bug rtl-optimization/117081] [15 Regression] FAIL: gcc.target/i386/pr91384.c since r15-1619-g3b9b8d6cfdf593
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117081 --- Comment #7 from H.J. Lu --- Created attachment 60350 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60350&action=edit ira: Don't increase callee-saved register cost by 1000x
[Bug fortran/118571] UTF-8 output and the A edit descriptor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118571 Jerry DeLisle changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #13 from Jerry DeLisle --- Closing as fixed.
[Bug target/36388] no .eh_frame_hdr table will be created
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36388 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski --- >While linking binary, I link it with libgcc.a taken from gcc2.95 and linker >gives me some errors like these: That was never a supported thing to do even back then. GCC 2.95.3 and GCC 3.4.0 had a hugely different ABI.
[Bug middle-end/36571] Default untyped return for AVR is byte register.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36571 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed||2025-02-02 --- Comment #2 from Andrew Pinski --- Still xfailed. /* { dg-xfail-run-if "PR36571 untyped return is char register" { "avr-*-*" } } */
[Bug c++/36475] [gomp] register keyword in openmp handled for-loop fails
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36475 Andrew Pinski changed: What|Removed |Added Component|libgomp |c++ Severity|normal |minor Last reconfirmed|2009-02-08 15:54:31 |2025-2-1 --- Comment #3 from Andrew Pinski --- Clang accepts it with `-fopenmp -std=c++98`. I am not 100% sure we need this though. Since it is rejected for -std=c++17 these days anyways.
[Bug preprocessor/118700] Include resolution changes when using -isystem and some headers are symlinks between directories where one is a prefix of the other
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118700 --- Comment #3 from Andrew Pinski --- -fno-canonical-system-headers fixes it.
[Bug preprocessor/118700] Include resolution changes when using -isystem and some headers are symlinks between directories where one is a prefix of the other
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118700 --- Comment #4 from Andrew Pinski --- https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-fno-canonical-system-headers https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-fno-canonical-system-headers There is not enough documentation to say what this option does though.
[Bug preprocessor/118700] Include resolution changes when using -isystem and some headers are symlinks between directories where one is a prefix of the other
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118700 --- Comment #5 from Andrew Pinski --- So I think this is by design. But there is not much documentation on it though.
[Bug preprocessor/61918] With -isystem, symlinks are sometimes processed incorrectly
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61918 --- Comment #2 from Andrew Pinski --- I suspect -fno-canonical-system-headers fixes the behavior to what you think it should be.
[Bug fortran/93289] array constructor of different length: Missing diagnostic when PARAMETER is in list
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93289 --- Comment #6 from anlauf at gcc dot gnu.org --- Submitted: https://gcc.gnu.org/pipermail/fortran/2025-February/061662.html Note: the testcase generates a hard error with NAG, while with ifx the most can get is a warning... The patch does not address nested array constructors. These have known issues tracked in pr107721.
[Bug c++/118722] accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 --- Comment #5 from Xi Ruoyao --- (In reply to mauro russo from comment #4) > > an ODR violation is still an undefined behavior > > That's interesting, > > I supposed this was only for the case of multiple/different definitions. No. A simplistic example: extern int this_does_not_exist_at_all; int main() { return this_does_not_exist_at_all * 0; } GCC does not diagnose it and it's **not** a bug.
[Bug c++/86960] [12/13/14/15 Regression] ICE on specialization of member template with fixed parameter pack
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86960 --- Comment #20 from Andrew Pinski --- (In reply to Marek Polacek from comment #19) > The ICE was fixed by r15-3195. I'm not sure it's valid code so this may be > fixed now. The odd thing is if the outer class was not a variadic arg template, all compilers I tried accept it. That is: ``` template struct Outer { template struct Inner; }; template<> template struct Outer::Inner { static constexpr bool value = x; }; static_assert(Outer::Inner::value); ``` But once you change T to be variandic, compilers reject it. I don't see why we are just specializing the inner with outer being T...=={bool}.
[Bug bootstrap/92002] [12/13/14/15 regression] -Wuninitialized warning in gcc/wide-int.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92002 --- Comment #22 from Andrew Pinski --- I can't reproduce with the reduced testcase in comment #6 with GCC 12+. I have not tested the original testcase though.
[Bug tree-optimization/93271] [12/13/14 regression] SRA producing wrong code on denormals
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93271 Andrew Pinski changed: What|Removed |Added Known to work||15.0 Summary|[12/13/14/15 regression]|[12/13/14 regression] SRA |SRA producing wrong code on |producing wrong code on |denormals |denormals --- Comment #20 from Andrew Pinski --- This now works on the trunk by r15-3070. Candidate (3972): a ! Disqualifying val - part of a volatile reference. Cannot scalarize the following access because data would be held in a mode which is not guaranteed to preserve all bits. access { base = (3972)'a', offset = 0, size = 32, expr = a.b, type = float, reverse = 0, write = 0, grp_total_scalarization = 0, grp_partial_lhs = 0} Cannot scalarize the following access because data would be held in a mode which is not guaranteed to preserve all bits. access { base = (3972)'a', offset = 0, size = 32, expr = a.b, type = float, reverse = 0, write = 0, grp_total_scalarization = 0, grp_partial_lhs = 0} ! Disqualifying a - No scalar replacements to be created.
[Bug other/116176] SARIF output doesn't yet capture nesting of logical locations
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116176 --- Comment #1 from GCC Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:cf24c0fa53870da6e666a97b79c4b053317c4951 commit r15-7317-gcf24c0fa53870da6e666a97b79c4b053317c4951 Author: David Malcolm Date: Sat Feb 1 08:38:13 2025 -0500 sarif-replay: support "cached" logical locations [§3.33.3] Some SARIF files offload most of the properties within logical locations in the results to an array of "cached" instances in theRun.logicalLocations, so the information can be consolidated (and to support the "parentIndex" property, which is PR 116176). Support such files in sarif-replay. gcc/ChangeLog: * libsarifreplay.cc (sarif_replayer::handle_run_obj): Pass run to handle_result_obj. (sarif_replayer::handle_result_obj): Add run_obj param and pass it to handle_location_object and handle_thread_flow_object. (sarif_replayer::handle_thread_flow_object): Add run_obj param and pass it to handle_thread_flow_location_object. (sarif_replayer::handle_thread_flow_location_object): Add run_obj param and pass it to handle_location_object. (sarif_replayer::handle_location_object): Add run_obj param and pass it to handle_logical_location_object. (sarif_replayer::handle_logical_location_object): Add run_obj param. If the run_obj is non-null and has "logicalLocations", then use these "cached" logical locations if we see an "index" property, as per §3.33.3 gcc/testsuite/ChangeLog: * sarif-replay.dg/2.1.0-invalid/3.33.3-index-out-of-range.sarif: New test. * sarif-replay.dg/2.1.0-valid/spec-example-4.sarif: Update expected output to reflect that we now find the function name for the events in the path. Signed-off-by: David Malcolm
[Bug c++/118723] internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3346
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118723 --- Comment #1 from Ran Regev --- The smallest file size I can compress the result of -freport-bug is 1.6M Please advise on how to proceed (as only up to 1M is allowed to be uploaded)
[Bug c++/118722] accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 --- Comment #4 from mauro russo --- > an ODR violation is still an undefined behavior That's interesting, I supposed this was only for the case of multiple/different definitions.
[Bug c++/118723] internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3346
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118723 --- Comment #2 from Andrew Pinski --- (In reply to Ran Regev from comment #1) > The smallest file size I can compress the result of -freport-bug is 1.6M > Please advise on how to proceed (as only up to 1M is allowed to be uploaded) I guess this once you can place it somewhere and I will try to get it down further. Using xz sometimes will produce smaller files than say gzip or zip. bzip2 is an improvement over gzip but xz a lot of time is smaller.
[Bug modula2/118703] Abort compiling m2pim_NumberIO_BinToStr since r15-7223-g92a5c5100c2519
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118703 Gaius Mulley changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #5 from Gaius Mulley --- Closing now that the patch has been applied. Thanks for the bug report.
[Bug c++/118722] accepted undefined static integral data member
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118722 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #3 from Xi Ruoyao --- Even if an earlier standard version is used where no such special case exists, an ODR violation is still an undefined behavior for which the compiler can do any thing, including rejecting it or doing something happens to satisfy your needs. Neither behavior is a bug, so both the link error report and this report are invalid.
[Bug rtl-optimization/116244] [15 Regression] reload ICE building libstdc++ for coldfire
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116244 --- Comment #9 from Jeffrey A. Law --- Starting to think this is actually an IRA bug that was partially fixed about 11 years ago. Testing a potential fix.
[Bug target/118485] [15 Regression] gnat fails to build on m68k-linux-gnu-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118485 Mikael Pettersson changed: What|Removed |Added CC||mikpelinux at gmail dot com --- Comment #5 from Mikael Pettersson --- I see the same failure with vanilla gcc-15-20250119 in a native bootstrap on m68k-linux-gnu. Trying a bisect, but it'll be painfully slow.
[Bug modula2/118703] Abort compiling m2pim_NumberIO_BinToStr since r15-7223-g92a5c5100c2519
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118703 Gaius Mulley changed: What|Removed |Added Attachment #60348|0 |1 is obsolete|| --- Comment #3 from Gaius Mulley --- Created attachment 60349 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60349&action=edit Proposed fix v2 for the gcc bit count builtins A tidy up of the previous patch. I'll commit it once it has been bootstrapped on a variety of architectures.
[Bug modula2/118703] Abort compiling m2pim_NumberIO_BinToStr since r15-7223-g92a5c5100c2519
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118703 --- Comment #4 from GCC Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:e2d32c81a993a27f3e9b5408f5d20580fe58feca commit r15-7319-ge2d32c81a993a27f3e9b5408f5d20580fe58feca Author: Gaius Mulley Date: Sat Feb 1 17:17:31 2025 + PR modula2/118703 Abort compiling m2pim_NumberIO_BinToStr This patch builds access to the gcc builtins clz, clzl, clzll, ctz, ctzl and ctzll within m2builtins.cc. The patch provides modula2 api access to clz, clzll, ctz and ctzll though the Builtins definition module. This PR was raised because of PR118689. gcc/m2/ChangeLog: PR modula2/118703 * gm2-gcc/m2builtins.cc (define_builtin_gcc): New function. (m2builtins_init): Call define_builtin_gcc. * gm2-libs/Builtins.def (clz): New procedure function. (clzll): Ditto. (ctz): Ditto. (ctzll): Ditto. * gm2-libs/Builtins.mod (clz): New procedure function. (clzll): Ditto. (ctz): Ditto. (ctzll): Ditto. * gm2-libs/cbuiltin.def (clz): New procedure function. (clzll): Ditto. (ctz): Ditto. (ctzll): Ditto. gcc/testsuite/ChangeLog: PR modula2/118703 * gm2/builtins/run/pass/testbitfns.mod: New test. Signed-off-by: Gaius Mulley
[Bug modula2/115032] gm2/iso/run/pass/packed.mod FAILs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115032 --- Comment #3 from Gaius Mulley --- PR-118703 (introducing builtins ctz, ctzl, ctzll, clz, clzl, clzll) has been closed.
[Bug c++/118723] internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3346
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118723 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=116914, ||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=118491 --- Comment #3 from Andrew Pinski --- This might be a dup of bug 116914 (or one of the other like PR 118491 ) based on the scylladb source. coroutines with range for loops are known to cause an ICE on the GCC trunk (see the 2 referenced bug reports).
[Bug c++/59173] [12/13/14/15 Regression] Alias template in partial specialization finds name from primary template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59173 --- Comment #9 from Andrew Pinski --- There was a defect report in this area and GCC is correctly accepting this code now IIRC.
[Bug c++/59173] [12/13/14/15 Regression] Alias template in partial specialization finds name from primary template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59173 --- Comment #10 from Andrew Pinski --- DR1710 and DR 343 https://cplusplus.github.io/CWG/issues/343.html https://cplusplus.github.io/CWG/issues/1710.html Implemented by r10-7403 though a defect across all language levels rather than C++17+ ... I am not sure if that matters though.
[Bug c++/59173] [12/13/14/15 Regression] Alias template in partial specialization finds name from primary template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59173 --- Comment #12 from Andrew Pinski --- Note the libstdc++ patch is still needed there because clang does not implement the defect report.
[Bug c++/59173] [12/13/14/15 Regression] Alias template in partial specialization finds name from primary template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59173 --- Comment #11 from Andrew Pinski --- See my analysis in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118347#c4 about why this is valid C++17 at least.
[Bug fortran/111477] Procedure as actual argument fails against procedure pointer dummy argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111477 Damian Rouson changed: What|Removed |Added CC||damian at archaeologic dot codes --- Comment #1 from Damian Rouson --- This is a feature that was added in the Fortran 2008 standard as I believe the introduction of the standard states, but I'm having a hard time tracking down the relevant language in the standard. If I recall correctly, the Fortran 2008 standard neglected to mention in the Introduction that this feature was added. Then somewhere in the 2018 (or maybe the 2023 standard), there's a list of features that were added in previous standards but not mentioned in the introduction to those previous standards. I just isolated the reproducer below and then realized it's probably redundant with the one already posted in the initial bug report. % gfortran --version GNU Fortran (Homebrew GCC 14.2.0_1) 14.2.0 % gfortran all.F90 all.F90:35:22: 35 | test_description = test_description_t(do_something) | 1 Error: Component 'test_function_' at (1) is a PRIVATE component of 'test_description_t' % cat all.F90 module julienne_test_description_m implicit none private public :: test_description_t abstract interface function test_function_i() result(passed) implicit none logical passed end function end interface type test_description_t private procedure(test_function_i), pointer, nopass :: test_function_ => null() end type interface test_description_t module procedure construct_from_character_and_test_function end interface contains function construct_from_character_and_test_function(test_function) result(test_description) procedure(test_function_i), intent(in), pointer :: test_function type(test_description_t) test_description test_description%test_function_ => test_function end function end module program gfortran_reproducer use julienne_test_description_m implicit none type(test_description_t) test_description test_description = test_description_t(do_something) contains logical function do_something() do_something = .false. end function end program
[Bug fortran/111477] Procedure as actual argument fails against procedure pointer dummy argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111477 --- Comment #2 from Damian Rouson --- Scratch that. I think the code in the original submission _might_ be invalid because it uses an internal subprogram rather than module procedure. So I'll submit a new bug report because I think this one is likely to get marked invalid at some point.
[Bug fortran/118724] New: [F08] Gfortran rejects passing a procedure as an actual argument to a procedure pointer dummy argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118724 Bug ID: 118724 Summary: [F08] Gfortran rejects passing a procedure as an actual argument to a procedure pointer dummy argument Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: damian at archaeologic dot codes Target Milestone: --- The Fortran 2008 standard added a feature that allows for a procedure name to be passed as the actual argument to a procedure pointer dummy argument. Gfortran rejects this. The work around is to declare a procedure pointer, associate the pointer with the procedure name, and then pass the pointer as the actual argument, which is relatively painless except unfortunately this is a pattern that is used throughout Berkeley Lab's Julienne unit testing framework and in every project that uses Julienne as a testing framework so tripling the lines of code generate quite a lot of workaround code across several projects. In the example below, the preprocessor macro _GFORTRAN_ uses the work around to enable the code to compile, but in each case it's the alternate code between #else and #endif that is what I use with other compilers. This at first looks like a duplicate of 67277, but I think that the code originally submitted there is invalid because the procedure is an internal subprogram rather than a module procedure so I'm submitting this separately because I think 67277 might get marked as invalid at some point. ``` % gfortran --version GNU Fortran (Homebrew GCC 14.2.0_1) 14.2.0 % gfortran all.F90 all.F90:35:22: 35 | test_description = test_description_t(do_something) | 1 Error: Component 'test_function_' at (1) is a PRIVATE component of 'test_description_t' % cat all.F90 module julienne_test_description_m implicit none private public :: test_description_t abstract interface function test_function_i() result(passed) implicit none logical passed end function end interface type test_description_t private procedure(test_function_i), pointer, nopass :: test_function_ => null() end type interface test_description_t module procedure construct_from_character_and_test_function end interface contains function construct_from_character_and_test_function(test_function) result(test_description) procedure(test_function_i), intent(in), pointer :: test_function type(test_description_t) test_description test_description%test_function_ => test_function end function end module program gfortran_reproducer use julienne_test_description_m implicit none type(test_description_t) test_description test_description = test_description_t(do_something) contains logical function do_something() do_something = .false. end function end program
[Bug fortran/118724] [F08] Gfortran rejects passing a procedure as an actual argument to a procedure pointer dummy argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118724 Jerry DeLisle changed: What|Removed |Added CC||jvdelisle at gcc dot gnu.org --- Comment #1 from Jerry DeLisle --- Thanls for reproducer.
[Bug tree-optimization/57534] [12/13/14/15 Regression]: Performance regression versus 4.7.3, 4.8.1 is ~15% slower
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57534 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Known to fail||14.2.0 Status|ASSIGNED|RESOLVED Target Milestone|12.5|15.0 Known to work||15.0 --- Comment #43 from Andrew Pinski --- Fixed on the trunk via the late_combine2 (the new forwprop like pass that runs after RA): ``` .L2: fldl8(%ebx,%esi,8) faddl (%ebx,%esi,8) faddl 16(%ebx,%esi,8) faddl 24(%ebx,%esi,8) faddp %st, %st(1) fldl32(%ebx,%esi,8) faddl 40(%ebx,%esi,8) faddl 48(%ebx,%esi,8) faddl 56(%ebx,%esi,8) addl$8, %esi faddp %st, %st(2) cmpl%edx, %esi jl .L2 ``` While GCC 14.2.0 produced: ``` .L2: leal0(,%esi,8), %eax fldl8(%ebx,%eax) faddl (%ebx,%esi,8) addl$8, %esi faddl 16(%ebx,%eax) faddl 24(%ebx,%eax) faddp %st, %st(2) fldl32(%ebx,%eax) faddl 40(%ebx,%eax) faddl 48(%ebx,%eax) faddl 56(%ebx,%eax) faddp %st, %st(1) cmpl%edx, %esi jl .L2 ```
[Bug c++/49637] template function overload incorrectly ambiguous
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49637 --- Comment #13 from Andrew Pinski --- (In reply to Jason Merrill from comment #12) > I've suggested that we reopen DR 214 in order to make this testcase valid. Looks like that never happened.
[Bug fortran/118571] UTF-8 output and the A edit descriptor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118571 --- Comment #14 from kargls at comcast dot net --- (In reply to Jerry DeLisle from comment #13) > Closing as fixed. Thanks!
[Bug middle-end/26724] __builtin_constant_p fails to recognise function with constant return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26724 Andrew Pinski changed: What|Removed |Added Keywords|missed-optimization |documentation Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #6 from Andrew Pinski --- From https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fconstant_005fp: The expression is not evaluated, side-effects are discarded. So a function call is a side effect and will be thrown away.
[Bug target/50150] misc vect.exp failures for target arm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50150 Andrew Pinski changed: What|Removed |Added Keywords||testsuite-fail --- Comment #5 from Andrew Pinski --- I suspect most of this was already cleaned up but I have no prove for that.
[Bug c++/102915] GCC allows a trailing requires clause on a non templated lambda
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102915 Patrick Palka changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID CC||ppalka at gcc dot gnu.org --- Comment #1 from Patrick Palka --- A lambda defined inside a template is templated (https://eel.is/c++draft/temp.pre#def:templated).
[Bug other/118725] New: libcpp build failure with NLS enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118725 Bug ID: 118725 Summary: libcpp build failure with NLS enabled Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: judge.packham at gmail dot com Target Milestone: --- We have a crosstool-ng config (x86_64-w64-mingw32,arm-cortexa9_neon-linux-gnueabihf) that enables NLS support. When we get to building libcpp we hit the following build failure [ALL ]In file included from /home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/src/gcc/libcpp/identifiers.cc:26: [ERROR] /home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/buildtools/complibs-host/include/libintl.h:1089:34: error: expected unqualified-id before 'const' [ALL ] 1089 | char *setlocale (int __category, const char *__locale) [ALL ] | ^ [ALL ] /home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/src/gcc/libcpp/system.h:275:39: note: in definition of macro 'setlocale' [ALL ] 275 | # define setlocale(category, locale) (locale) [ALL ] | ^~ I think libcpp's configure is missing a check for setlocale so it ends up defining a fallback setlocale macro that confuses things when it sees the definition in libintl.h.
[Bug preprocessor/118725] libcpp build failure with NLS enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118725 --- Comment #1 from Andrew Pinski --- How was libintl built? Did you build it as part of gcc or separately?
[Bug preprocessor/118725] libcpp build failure with NLS enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118725 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED |WAITING Last reconfirmed||2025-02-02 --- Comment #3 from Andrew Pinski --- What was the command to invoke configure used? How about make?
[Bug preprocessor/118725] libcpp build failure with NLS enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118725 --- Comment #2 from Andrew Pinski --- This could also be a bug in crosstool ng.
[Bug lto/60893] Unable to use link time optimizer with profiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60893 --- Comment #2 from Andrew Pinski --- reorder_blocks_and_partition
[Bug lto/60893] Unable to use link time optimizer with profiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60893 --- Comment #3 from Andrew Pinski --- /* Disable -freorder-blocks-and-partition when unwind tables are being emitted for Darwin < 9 (OSX 10.5). The strategy is, "Unless the user has specifically set/unset an unwind flag we will switch off -freorder-blocks-and-partition when unwind tables will be generated". If the user specifically sets flags, we have to assume they know why. */ if (generating_for_darwin_version < 9 && OPTION_SET_P (flag_reorder_blocks_and_partition) && flag_reorder_blocks_and_partition && ((global_options.x_flag_exceptions/* User, c++, java */ && !OPTION_SET_P (flag_exceptions)) /* User specified... */ || (global_options.x_flag_unwind_tables && !OPTION_SET_P (flag_unwind_tables)) || (global_options.x_flag_non_call_exceptions && !OPTION_SET_P (flag_non_call_exceptions)) || (global_options.x_flag_asynchronous_unwind_tables && !OPTION_SET_P (flag_asynchronous_unwind_tables { inform (input_location, "%<-freorder-blocks-and-partition%> does not work with " "exceptions on this architecture"); flag_reorder_blocks_and_partition = 0; flag_reorder_blocks = 1; }
[Bug lto/60893] Unable to use link time optimizer with profiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60893 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #4 from Andrew Pinski --- Fixed for GCC 8. *** This bug has been marked as a duplicate of bug 81033 ***
[Bug bootstrap/81033] [8 Regression] there are cases where ld64 is not able to determine correct atom boundaries from the output GCC currently produces
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81033 Andrew Pinski changed: What|Removed |Added CC||dturnbull at gmail dot com --- Comment #52 from Andrew Pinski --- *** Bug 60893 has been marked as a duplicate of this bug. ***
[Bug preprocessor/118725] libcpp build failure with NLS enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118725 --- Comment #4 from Chris Packham --- > How was libintl built? > Did you build it as part of gcc or separately? Built separately > This could also be a bug in crosstool ng. Yes that's certainly a possibility. > What was the command to invoke configure used? How about make? libcpp configure command: /home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/src/gcc/libcpp/configure --srcdir=/home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/src/gcc/libcpp --cache-file=./config.cache --prefix=/home/ctng/x-tools/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf --exec_prefix=/home/ctng/x-tools/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf --with-sysroot=/home/ctng/x-tools/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/arm-cortexa9_neon-linux-gnueabihf/sysroot --with-cpu=cortex-a9 --with-fpu=neon --with-float=hard --with-pkgversion=crosstool-NG 1.27.0_rc1.8_d96289e --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/buildtools/complibs-host --with-mpfr=/home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/buildtools/complibs-host --with-mpc=/home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/buildtools/complibs-host --with-isl=/home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/buildtools/complibs-host --enable-lto --enable-threads=posix --disable-plugin --enable-gold --with-libintl-prefix=/home/ctng/crosstool-ng/.build/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/buildtools/complibs-host --disable-multilib --with-local-prefix=/home/ctng/x-tools/HOST-x86_64-w64-mingw32/arm-cortexa9_neon-linux-gnueabihf/arm-cortexa9_neon-linux-gnueabihf/sysroot --enable-long-long --enable-languages=c,c++,lto --program-transform-name=s&^&arm-cortexa9_neon-linux-gnueabihf-& --disable-option-checking --build=x86_64-build_pc-linux-gnu --host=x86_64-host_w64-mingw32 --target=arm-cortexa9_neon-linux-gnueabihf
[Bug target/55666] Use scratch register to avoid save/restore of callee saved register with -Os
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55666 Andrew Pinski changed: What|Removed |Added Summary|Use scratch register to |Use scratch register to |avoid save/restore of |avoid save/restore of |callee saved register |callee saved register with ||-Os --- Comment #3 from Andrew Pinski --- Fixed for !-Os by r10-3809-g3635c2bf7c40a9 as -Os still has the failure.
[Bug target/55987] Redundant constant emitted
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55987 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2013-01-15 00:00:00 |2025-2-1 Severity|normal |enhancement
[Bug testsuite/25320] dg-require-sharedlib should support installed compiler testing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25320 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2005-12-12 20:49:38 |2025-2-1 CC||iains at gcc dot gnu.org --- Comment #2 from Andrew Pinski --- Still doing that: ``` # Locate libstdc++ shared library. (ie libstdc++.so.) set v3-sharedlib 0 set sharedlibdir [lookfor_file $blddir src/.libs/libstdc++.$shlib_ext] if {$sharedlibdir != ""} { if { ([string match "*-*-gnu*" $target_triplet] || [string match "*-*-linux*" $target_triplet] || [string match "*-*-solaris*" $target_triplet]) && [isnative] } then { set v3-sharedlib 1 verbose -log "shared library support detected" } } v3track v3-sharedlib 3 ``` Most likely should also be enabled for darwin too.
[Bug preprocessor/118725] libcpp build failure with NLS enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118725 --- Comment #5 from Chris Packham --- I'll add that it seems to only happen with gettext-0.23.1. If I pin the config to use gettext-0.22.5 the build succeeds.
[Bug bootstrap/118369] Multilib bootstrap on Debian 12 fails due to missing asm/errno.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118369 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #15 from Andrew Pinski --- Invalid as figured out.
[Bug c++/118726] New: GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O2 level
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118726 Bug ID: 118726 Summary: GCC generates wrong code when using non-structured binding declaration as the condition of a for-loop at O2 level Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: xiaohuba2021 at 163 dot com Target Milestone: --- The following code: ``` #include int main() { volatile int x = 10; for (int l = 1; int d = x - l; x = d + 1) { int &z = d; std::cout << z << '\n'; } } ``` continues to output `9` and crashes on trunk, with `-O2` enabled, while clang works properly. godbolt: https://godbolt.org/z/1nx6fvo1M compiler version: ``` Using built-in specs. COLLECT_GCC=/opt/compiler-explorer/gcc-snapshot/bin/g++ Target: x86_64-linux-gnu Configured with: ../gcc-trunk-20250201/configure --prefix=/opt/compiler-explorer/gcc-build/staging --enable-libstdcxx-backtrace=yes --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-bootstrap --enable-multiarch --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --enable-clocale=gnu --enable-languages=c,c++,fortran,ada,objc,obj-c++,go,d,rust,m2 --enable-ld=yes --enable-gold=yes --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-linker-build-id --enable-lto --enable-plugins --enable-threads=posix --with-pkgversion=Compiler-Explorer-Build-gcc-d3ba88308426b3db55793831b0ae8c760aad9de7-binutils-2.42 Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.1 20250201 (experimental) (Compiler-Explorer-Build-gcc-d3ba88308426b3db55793831b0ae8c760aad9de7-binutils-2.42) COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-g' '-o' '/app/output.s' '-masm=intel' '-fno-verbose-asm' '-S' '-O2' '-Wall' '-Wextra' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir' '/app/' /opt/compiler-explorer/gcc-trunk-20250201/bin/../libexec/gcc/x86_64-linux-gnu/15.0.1/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -iprefix /opt/compiler-explorer/gcc-trunk-20250201/bin/../lib/gcc/x86_64-linux-gnu/15.0.1/ -D_GNU_SOURCE -quiet -dumpdir /app/ -dumpbase output.cpp -dumpbase-ext .cpp -masm=intel -mtune=generic -march=x86-64 -g -O2 -Wall -Wextra -version -fdiagnostics-color=always -fno-verbose-asm -o /app/output.s GNU C++17 (Compiler-Explorer-Build-gcc-d3ba88308426b3db55793831b0ae8c760aad9de7-binutils-2.42) version 15.0.1 20250201 (experimental) (x86_64-linux-gnu) compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ```
[Bug sanitizer/118721] &array[-1] not always detected with -fsanitize=undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118721 --- Comment #1 from Jakub Jelinek --- That is not the scope of ubsan. To diagnose this generally (unless forward propagation etc. makes it clear out of bounds) you really need object known object boundaries for that. So it is more like a variant of -fsanitize=pointer-subtract, except that it wouldn't be checking the case where people do ptr1 - ptr2 in the source, but would check on pointer arithmetics the old vs. new value. Bet it would be really expensive and would need libasan support (so that it doesn't mislead people that there is a problem with pointer subtraction but with pointer arithmetics).
[Bug c++/85889] lambda expression can capture structured bindings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889 --- Comment #15 from Giuseppe D'Angelo --- Unfortunately not; that is https://cplusplus.github.io/CWG/issues/2313.html .
[Bug c++/85889] lambda expression can capture structured bindings
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85889 --- Comment #14 from Jakub Jelinek --- Aren't then in C++17 at least the std::tuple* using structured bindings objects (each v_i in that case is a variable) and thus entities?
[Bug ada/118712] [13/14/15 regression] segfault on uninitialized variable as operand of primitive operator of derived real type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118712 --- Comment #5 from GCC Commits --- The master branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:8ca6bbf84c168056c94b5f0374fb82916ee24772 commit r15-7316-g8ca6bbf84c168056c94b5f0374fb82916ee24772 Author: Eric Botcazou Date: Sat Feb 1 10:56:44 2025 +0100 Ada: Fix segfault on uninitialized variable as operand of primitive operator ...of derived real type. It comes from an unexpected internal adjustment. gcc/ada/ PR ada/118712 * sem_warn.adb (Check_References): Deal with small adjustments of references. gcc/testsuite/ * gnat.dg/warn33.adb: New test. * gnat.dg/warn33_pkg.ads: New helper.
[Bug ada/118712] [13/14/15 regression] segfault on uninitialized variable as operand of primitive operator of derived real type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118712 --- Comment #7 from GCC Commits --- The releases/gcc-13 branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:a10a46d7b61d694dc0114175c45deb61df96e918 commit r13-9358-ga10a46d7b61d694dc0114175c45deb61df96e918 Author: Eric Botcazou Date: Sat Feb 1 10:56:44 2025 +0100 Ada: Fix segfault on uninitialized variable as operand of primitive operator ...of derived real type. It comes from an unexpected internal adjustment. gcc/ada/ PR ada/118712 * sem_warn.adb (Check_References): Deal with small adjustments of references. gcc/testsuite/ * gnat.dg/warn33.adb: New test. * gnat.dg/warn33_pkg.ads: New helper.
[Bug ada/118712] [13/14/15 regression] segfault on uninitialized variable as operand of primitive operator of derived real type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118712 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Eric Botcazou --- Fixed on the mainline, 14 and 13 branches.
[Bug ada/118712] [13/14/15 regression] segfault on uninitialized variable as operand of primitive operator of derived real type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118712 --- Comment #6 from GCC Commits --- The releases/gcc-14 branch has been updated by Eric Botcazou : https://gcc.gnu.org/g:8c79b66dbcaa63fb76abbae9d794dbce68338400 commit r14-11266-g8c79b66dbcaa63fb76abbae9d794dbce68338400 Author: Eric Botcazou Date: Sat Feb 1 10:56:44 2025 +0100 Ada: Fix segfault on uninitialized variable as operand of primitive operator ...of derived real type. It comes from an unexpected internal adjustment. gcc/ada/ PR ada/118712 * sem_warn.adb (Check_References): Deal with small adjustments of references. gcc/testsuite/ * gnat.dg/warn33.adb: New test. * gnat.dg/warn33_pkg.ads: New helper.