[Bug bootstrap/30828] New: make bootstrap failed on linux
make bootstrap failed with the following error: /home/xiaoyi/build/obj.gcc412/./gcc/xgcc -shared-libgcc -B/home/xiaoyi/build/obj.gcc412/./gcc -nostdinc++ -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/exp/opt/gcc412/i686-pc-linux-gnu/bin/ -B/exp/opt/gcc412/i686-pc-linux-gnu/lib/ -isystem /exp/opt/gcc412/i686-pc-linux-gnu/include -isystem /exp/opt/gcc412/i686-pc-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/xiaoyi/build/obj.gcc412/./gcc/crtbeginS.o .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o .libs/globals_io.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o .libs/list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o .libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o .libs/iostream-inst.o .libs/istream-inst.o .libs/istream.o .libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/home/xiaoyi/build/obj.gcc412/./gcc -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s /home/xiaoyi/build/obj.gcc412/./gcc/crtendS.o /usr/lib/crtn.o -Wl,-O1 -Wl,-z -Wl,relro -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.8 /usr/bin/ld: BFD 2.15.92.0.2 20040927 internal error, aborting at ../../bfd/elf32-i386.c line 2262 in elf_i386_relocate_section /usr/bin/ld: Please report this bug. collect2: ld returned 1 exit status make[5]: *** [libstdc++.la] Error 1 make[5]: Leaving directory `/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src' -- Summary: make bootstrap failed on linux Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xiaoyi_wu at yahoo dot com GCC build triplet: Linux GCC host triplet: Linux GCC target triplet: Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30828
[Bug bootstrap/30889] New: make bootstrap failed on linux
make bootstrap failed with the following error: /home/xiaoyi/build/obj.gcc412/./gcc/xgcc -shared-libgcc -B/home/xiaoyi/build/obj.gcc412/./gcc -nostdinc++ -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/exp/opt/gcc412/i686-pc-linux-gnu/bin/ -B/exp/opt/gcc412/i686-pc-linux-gnu/lib/ -isystem /exp/opt/gcc412/i686-pc-linux-gnu/include -isystem /exp/opt/gcc412/i686-pc-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/xiaoyi/build/obj.gcc412/./gcc/crtbeginS.o .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o .libs/globals_io.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o .libs/list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o .libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o .libs/iostream-inst.o .libs/istream-inst.o .libs/istream.o .libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/home/xiaoyi/build/obj.gcc412/./gcc -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s /home/xiaoyi/build/obj.gcc412/./gcc/crtendS.o /usr/lib/crtn.o -Wl,-O1 -Wl,-z -Wl,relro -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.8 /usr/bin/ld: BFD 2.15.92.0.2 20040927 internal error, aborting at ../../bfd/elf32-i386.c line 2262 in elf_i386_relocate_section /usr/bin/ld: Please report this bug. collect2: ld returned 1 exit status make[5]: *** [libstdc++.la] Error 1 make[5]: Leaving directory `/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src' -- Summary: make bootstrap failed on linux Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xiaoyi_wu at yahoo dot com GCC build triplet: Linux GCC host triplet: Linux GCC target triplet: Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30889
[Bug bootstrap/30890] New: make bootstrap failed on linux
make bootstrap failed with the following error: /home/xiaoyi/build/obj.gcc412/./gcc/xgcc -shared-libgcc -B/home/xiaoyi/build/obj.gcc412/./gcc -nostdinc++ -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/exp/opt/gcc412/i686-pc-linux-gnu/bin/ -B/exp/opt/gcc412/i686-pc-linux-gnu/lib/ -isystem /exp/opt/gcc412/i686-pc-linux-gnu/include -isystem /exp/opt/gcc412/i686-pc-linux-gnu/sys-include -shared -nostdlib /usr/lib/crti.o /home/xiaoyi/build/obj.gcc412/./gcc/crtbeginS.o .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o .libs/globals_io.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o .libs/list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o .libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o .libs/iostream-inst.o .libs/istream-inst.o .libs/istream.o .libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src -L/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/home/xiaoyi/build/obj.gcc412/./gcc -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s /home/xiaoyi/build/obj.gcc412/./gcc/crtendS.o /usr/lib/crtn.o -Wl,-O1 -Wl,-z -Wl,relro -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.8 /usr/bin/ld: BFD 2.15.92.0.2 20040927 internal error, aborting at ../../bfd/elf32-i386.c line 2262 in elf_i386_relocate_section /usr/bin/ld: Please report this bug. collect2: ld returned 1 exit status make[5]: *** [libstdc++.la] Error 1 make[5]: Leaving directory `/home/xiaoyi/build/obj.gcc412/i686-pc-linux-gnu/libstdc++-v3/src' -- Summary: make bootstrap failed on linux Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xiaoyi_wu at yahoo dot com GCC build triplet: Linux GCC host triplet: Linux GCC target triplet: Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30890
[Bug c++/91214] New: first atof function call not return correct result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91214 Bug ID: 91214 Summary: first atof function call not return correct result Product: gcc Version: 9.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: xiaoyi_wu at yahoo dot com Target Milestone: --- The first call to atof in the program gives incorrect result. Here is the terminal session: lima:~$ uname -a Linux lima 5.1.17-300.fc30.x86_64 #1 SMP Wed Jul 10 15:20:27 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux lima:~$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC) lima:~$ cat main.cc #include #include int main(int argc, const char **argv) { if (argc != 2) return printf("usage$ %s input.txt\n", *argv); FILE *file = fopen(argv[1], "r"); char line[256]; while (fgets(line, 256, file)) { printf("{%s} %g\n", line, atof(line)); } fclose(file); } lima:~$ cat input.txt 123.45 234.56 345.67 lima:~$ g++ -Wall -O3 main.cc lima:~$ a.out input.txt {123.45 } 0 {234.56 } 234.56 {345.67 } 345.67 lima:~$ This small program read lines from input.txt in a loop, and print the line and the atof value of the line out. But the first atof returns a 0 instead of the expected 123.45.
[Bug c++/91214] first atof function call not return correct result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91214 xiaoyi_wu at yahoo dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from xiaoyi_wu at yahoo dot com --- Never mind. False alarm. The text file has a not visible byte order mark of 0xefbbbf at the beginning, causing atof correctly returning 0.
[Bug c++/23645] New: internal compiler error
$ uname -a Linux rathercry.corp.yahoo.com 2.6.9-11.EL #1 Fri May 20 18:17:57 EDT 2005 i686 i686 i386 GNU/Linux $ g++ -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0.1/configure --prefix=/exp/opt/gcc401 --enable-languages=c++ Thread model: posix gcc version 4.0.1 $ cat main.cc namespace z { class A { public: A(int); ~A(); }; #ifdef _IMPL A::A(int) {} A::~A() {} #endif } using namespace z; int main() { A a(0), b(0); } $ g++ -Wall -O3 main.cc main.cc: In function int main(): main.cc:15: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. /* g++ -Wall -O3 -D_IMPL main.cc compiles fine, and g++ -Wall main.cc compiles fine, but linking complains about undefined A(int) and ~A(), as expected. */ -- Summary: internal compiler error Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: xiaoyi_wu at yahoo dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: Linux GCC host triplet: Linux GCC target triplet: Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23645
[Bug c++/23645] internal compiler error
--- Additional Comments From xiaoyi_wu at yahoo dot com 2005-08-31 23:34 --- Hi, this is the original reporter of this "bug". But a day later, I can not reproduce it at all on the same machine. I didn't even log out of my account. Strange! Anyway, I have changed the resolution to INVALID. If this is not what I supposed to do, please let me know. -- What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23645
[Bug c++/116527] New: conversion from float to char incorrect
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116527 Bug ID: 116527 Summary: conversion from float to char incorrect Product: gcc Version: 14.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: xiaoyi_wu at yahoo dot com Target Milestone: --- Created attachment 59024 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59024&action=edit source code to indicate the problem I have a fedora 40 virtual machine running on M3 MacBook Pro. Since the M3 is arm CPU instead of Intel, the default char in C++ in fedora is unsigned (unlike on Intel, which is signed). In the attached source code, function foo returns float, function bar returns double, both are assigned to char variable a and b. But the conversion is incorrect for float, and also for double when compiled without -O. Here is the system and gcc version: limo:work$ uname -a Linux limo 6.9.6-200.fc40.aarch64 #1 SMP PREEMPT_DYNAMIC Fri Jul 21 16:23:18 UTC 2024 aarch64 GNU/Linux limo:work$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-redhat-linux/14/lto-wrapper Target: aarch64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,m2,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=/usr/share/zoneinfo --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-14.1.1-20240620/obj-aarch64-redhat-linux/isl-install --enable-gnu-indirect-function --build=aarch64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.1.1 20240620 (Red Hat 14.1.1-6) (GCC) If I compile the source code with -O3: $ g++ -Wall -O3 main.cc the output is this: -5 0 251 -4 0 252 -3 0 253 -2 0 254 -1 0 255 0 0 0 1 1 1 2 2 2 3 3 3 4 4 4 This means double -1 convert to char will be 255, but float -1 convert to char will be 0, which is wrong. If I compile without optimization: $ gcc -Wall main.cc then the output is this: -5 0 0 -4 0 0 -3 0 0 -2 0 0 -1 0 0 0 0 0 1 1 1 2 2 2 3 3 3 4 4 4 which means both negative float and negative double convert to char becomes 0. Basically, negative float convert to char will result in 0, while negative double convert to char will result in 0 when compiled without optimization.