https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98220
--- Comment #4 from wuz73 at hotmail dot com --- In the attached test case, there is a makefile and source code. Here's the output without -flto: $ make g++ -std=c++11 -Wall -g -O2 -o main.o -c main.cpp g++ -std=c++11 -Wall -g -O2 -o module.o -c module.cpp g++ -std=c++11 -Wall -g -O2 -o moduleA.o -c moduleA.cpp g++ -std=c++11 -Wall -g -O2 -o moduleB.o -c moduleB.cpp g++ -std=c++11 -Wall -g -O2 -o test main.o module.o moduleA.o moduleB.o $ ./test modA a process modB b process With -flto: $ make g++ -std=c++11 -Wall -g -O2 -flto -o main.o -c main.cpp g++ -std=c++11 -Wall -g -O2 -flto -o module.o -c module.cpp g++ -std=c++11 -Wall -g -O2 -flto -o moduleA.o -c moduleA.cpp g++ -std=c++11 -Wall -g -O2 -flto -o moduleB.o -c moduleB.cpp g++ -std=c++11 -Wall -g -O2 -flto -o test main.o module.o moduleA.o moduleB.o $ ./test Floating point exception (core dumped)