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

            Bug ID: 112397
           Summary: Two persistent libstdc++ test failures on
                    x86_64-apple-darwin
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org
  Target Milestone: ---

FAIL: 17_intro/static.cc  -std=gnu++17 (test for excess errors)
FAIL: 20_util/to_chars/4.cc  -std=gnu++17 (test for excess errors)

The both have the same linker warning:

ld: warning: direct access in function 'operator new[](unsigned long,
std::nothrow_t const&) (.cold)' from file '/Users/fx/ibin-2023
1105/x86_64-apple-darwin21/./libstdc++-v3/src/.libs/libstdc++.a(new_opvnt.o)'
to global weak symbol 'operator new[](unsigned long, s
td::nothrow_t const&)' from file
'/Users/fx/ibin-20231105/x86_64-apple-darwin21/./libstdc++-v3/src/.libs/libstdc++.a(new_opvnt.o)'
m
eans the weak symbol cannot be overridden at runtime. This was likely caused by
different translation units being compiled with diff
erent visibility settings.

ld: warning: direct access in function 'operator new[](unsigned long,
std::nothrow_t const&) (.cold)' from file
'/Users/fx/ibin-20231105/x86_64-apple-darwin21/./libstdc++-v3/src/.libs/libstdc++.a(new_opvnt.o)'
to global weak symbol 'operator new[](unsigned long, std::nothrow_t const&)'
from file
'/Users/fx/ibin-20231105/x86_64-apple-darwin21/./libstdc++-v3/src/.libs/libstdc++.a(new_opvnt.o)'
means the weak symbol cannot be overridden at runtime. This was likely caused
by different translation units being compiled with different visibility
settings.

I am not sure what the "different visibility settings" are, or if it's just a
red herring, but the testcase is compiled with:

Executing on host: /Users/fx/ibin-20231105/./gcc/xg++ -shared-libgcc
-B/Users/fx/ibin-20231105/./gcc -nostdinc++
-L/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/src
-L/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/src/.libs
-L/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/libsupc++/.libs
-B/Users/fx/irun-20231105/x86_64-apple-darwin21/bin/
-B/Users/fx/irun-20231105/x86_64-apple-darwin21/lib/ -isystem
/Users/fx/irun-20231105/x86_64-apple-darwin21/include -isystem
/Users/fx/irun-20231105/x86_64-apple-darwin21/sys-include -fchecking=1
-B/Users/fx/ibin-20231105/x86_64-apple-darwin21/./libstdc++-v3/src/.libs
-fmessage-length=0 -fno-show-column -ffunction-sections -fdata-sections -g -O2
-DLOCALEDIR="." -nostdinc++
-I/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/include/x86_64-apple-darwin21
-I/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/include
-I/Users/fx/gcc-upstream/libstdc++-v3/libsupc++
-I/Users/fx/gcc-upstream/libstdc++-v3/include/backward
-I/Users/fx/gcc-upstream/libstdc++-v3/testsuite/util 
/Users/fx/gcc-upstream/libstdc++-v3/testsuite/17_intro/static.cc   
-std=gnu++17 -static-libstdc++ -fdiagnostics-plain-output ./libtestc++.a
-liconv
-L/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/src/filesystem/.libs
-L/Users/fx/ibin-20231105/x86_64-apple-darwin21/libstdc++-v3/src/experimental/.libs
 -lm  -o ./static.exe    (timeout = 360)

Reply via email to