[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2024-04-16 Thread peter0x44 at disroot dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

Peter Damianov  changed:

   What|Removed |Added

 CC||peter0x44 at disroot dot org

--- Comment #7 from Peter Damianov  ---
I believe I'm encountering this same bug with cppcheck, when building with
-flto -Os.

during GIMPLE pass: alias
lib/check64bit.h: In member function 'classInfo':
lib/check64bit.h:81:17: internal compiler error: in binds_to_current_def_p, at
symtab.cc:2497
   81 | std::string classInfo() const override {
  | ^
libbacktrace could not find executable to open
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See  for instructions.

This is with gcc 13.2.0

ext  := $(shell find externals -mindepth 1 -type d)
src  := $(shell find cli lib externals -name '*.cpp')
obj  := $(src:.cpp=.o)
CXXFLAGS := -w -Os -Ilib $(addprefix -I,$(ext)) -flto=auto
cppcheck.exe: $(obj)
x86_64-w64-mingw32-g++ -s -o $@ $(obj) -lshlwapi -flto=auto -Os -s

Place this makefile in the root of the repo, and run it.
(there is an existing one that didn't work for me, hence I named it
"cppcheck.mak")

make -f cppcheck.mak

Hope this helps!

[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2024-03-19 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

Sam James  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-03-19
 Status|UNCONFIRMED |WAITING

[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2023-02-06 Thread eebssk1 at godaftwithebk dot pub via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

--- Comment #6 from BBK  ---
I will try modify gcc's code to simply return instead of assert error if the
condition does not match to allow the compilation, and then check if the result
binary still woking as expected. This is only solution I came up with in the
mean time since devs are currently not focused on such small bug.

[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2023-01-14 Thread ivanka2012 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

Ivan  changed:

   What|Removed |Added

 CC||ivanka2012 at gmail dot com

--- Comment #5 from Ivan  ---
This is related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106103

[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2023-01-13 Thread eebssk1 at godaftwithebk dot pub via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

--- Comment #4 from eebssk1 at godaftwithebk dot pub ---
The problem occurs at final linking.

x86_64-w64-mingw32-g++  -o src/dxgi/dxgi.dll src/dxgi/dxgi.dll.p/version.o
src/dxgi/dxgi.dll.p/dxgi_adapter.cpp.obj src/dxgi/dxgi.dll.p/dxgi_enums.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_factory.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_format.cpp.obj src/dxgi/dxgi.dll.p/dxgi_main.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_monitor.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_options.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_output.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_surface.cpp.obj
src/dxgi/dxgi.dll.p/dxgi_swapchain.cpp.obj -Wl,--allow-shlib-undefined -Wl,-O1
-shared ../src/dxgi/dxgi.def -Wl,--start-group
-Wl,--out-implib=src/dxgi/dxgi.dll.a -static -static-libgcc -static-libstdc++
-Wl,--file-alignment=4096
-Wl,-O3,--relax,--sort-section=alignment,--sort-common=descending -flto
src/dxvk/libdxvk.a src/util/libutil.a src/spirv/libspirv.a src/wsi/libwsi.a
subprojects/libdisplay-info/libdisplay-info.a src/vulkan/libvkcommon.a -pthread
-lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid
-lcomdlg32 -ladvapi32 -Wl,--end-group -freport-bug
lto-wrapper: warning: using serial compilation of 13 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
during GIMPLE pass: alias
../src/dxgi/../util/log/../thread.h: In member function ‘__ct ’:
../src/dxgi/../util/log/../thread.h:110:14: internal compiler error: in
binds_to_current_def_p, at symtab.cc:2494


So uhh I currently have no idea on how to provide a testcase in such case.
Sorry,These compiler thing is not my profession. I just open such ticket as no
cares it before.

[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2023-01-13 Thread eebssk1 at godaftwithebk dot pub via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

--- Comment #3 from eebssk1 at godaftwithebk dot pub ---
Exactly same problem with -Os on lto.(Seems reflect the problem in that github
issue)

The project seems only supports mingw target.
I'll get back when have more information.

[Bug ipa/108383] g++ ICE with -O3 and -flto and -fdeclone-ctor-dtor on simple function

2023-01-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108383

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-reduction
  Component|c++ |ipa
 CC||marxin at gcc dot gnu.org

--- Comment #2 from Richard Biener  ---
The docs say this option is enabled by -Os, does using -Os reproduce the same
problem?

It would be nice to have a smaller testcase or to be able to reproduce on
x86_64-linux rather than only mingw ...