https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127513

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org,
                   |                            |redi at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Some bisection on preprocessed source from godbolt with gcc 14.1 with
-std=c++17 -E -D_GLIBCXX_DO_NOT_USE_BUILTIN_TRAITS
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r14-3906 -quiet -std=c++17 pr127513.ii
-O0 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r14-3907 -quiet -std=c++17 pr127513.ii
-O0 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/app/example.cpp:69:31: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:72:33: error: no matching function for call to ‘C0_1::C0_1()’
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r17-1660 -quiet -std=c++17 pr127513.ii
-O0 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/app/example.cpp:69:31: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:72:33: error: no matching function for call to ‘C0_1::C0_1()’
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r17-1661 -quiet -std=c++17 pr127513.ii
-O0 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/app/example.cpp:69:31: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:72:33: error: no matching function for call to ‘C0_1::C0_1()’
/app/example.cpp:87:24: error: no matching function for call to ‘S::S()’
/app/example.cpp:90:25: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:93:27: error: no matching function for call to ‘C0_1::C0_1()’
and exactly the same thing with -O2 on the same preprocessed source.
Same thing if it is preprocessed with gcc 14.1 with
-std=c++17 -E -D_GLIBCXX_DO_NOT_USE_BUILTIN_TRAITS -O2
Now, if the preprocessed source is created by gcc 16.1 instead and it is -O0,
the results are the same as well, while if it is -O2, I get
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r14-3906 -quiet -std=c++17 pr127513-3.ii
-O2 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r14-3907 -quiet -std=c++17 pr127513-3.ii
-O2 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/app/example.cpp:69:31: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:72:33: error: no matching function for call to ‘C0_1::C0_1()’
/app/example.cpp:75:37: error: no matching function for call to ‘C0_3::C0_3()’
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r17-1660 -quiet -std=c++17 pr127513-3.ii
-O2 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/app/example.cpp:69:31: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:72:33: error: no matching function for call to ‘C0_1::C0_1()’
/app/example.cpp:75:37: error: no matching function for call to ‘C0_3::C0_3()’
/opt/notnfs/gcc-bisect/obj/gcc/cc1plus.r17-1661 -quiet -std=c++17 pr127513-3.ii
-O2 2>&1 | grep error:
/app/example.cpp:66:30: error: no matching function for call to ‘S::S()’
/app/example.cpp:69:31: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:72:33: error: no matching function for call to ‘C0_1::C0_1()’
/app/example.cpp:75:37: error: no matching function for call to ‘C0_3::C0_3()’
/app/example.cpp:87:24: error: no matching function for call to ‘S::S()’
/app/example.cpp:90:25: error: no matching function for call to ‘C1::C1()’
/app/example.cpp:93:27: error: no matching function for call to ‘C0_1::C0_1()’
/app/example.cpp:96:31: error: no matching function for call to ‘C0_3::C0_3()’
So, clearly it is r14-3907-gea5abbb263315e558c876b50c9371b90ddd5e028 and
r17-1661-g60335dec4d21b5956afc1e3f1d865fed0b3cfd39 changes on the C++ FE side
and
some libstdc++ changes, the -O0 to -O2 changes in 16.1 preprocessed source are:
+namespace std
+{
+  __attribute__((__always_inline__,__visibility__("default")))
+  inline void
+  __glibcxx_assert_fail()
+  { }
+}
and 8 changes of the
-      do { if (__builtin_expect(!bool(__n >= 0), false))
std::__glibcxx_assert_fail("/cefs/38/383ad2f84cbd57a52fd68bbe_consolidated/compilers_c++_x86_gcc_16.1.0/include/c++/16.1.0/bits/stl_iterator_base_funcs.h",
203, __PRETTY_FUNCTION__, "__n >= 0"); } while (false);
+      do { if (std::__is_constant_evaluated() && !bool(__n >= 0))
std::__glibcxx_assert_fail(); } while (false);
kind in various places.
Those are I guess r14-6198-g5e8a30d8b8f4d7 and r14-6291-g1395c573c523762957bde8

Reply via email to