Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.3.2
-
None
Description
The attached example program compiles without error or warning, but if you run it from a terminal it produces the following output and clicking on the About button does not open the About Qt dialog:
QObject::connect: signal not found in QPushButton
I can reproduce this problem on a 64-bit Debian Linux system using Clang version 3.4, 3.5, or 3.6 and link time optimization, for instance:
clang++ main.cpp -o signal_not_found -flto [standard options]
Omitting -flto causes the compiled program to behave as expected. Using GCC (g++) version 4.7, 4.8, or 4.9, with or without -flto, also results in a normally-functioning program. Unlike the reporter of bug 41863, I do not have any trouble using GCC 4.7. Only the combination of Clang and link time optimization reproduce the problem.
Where the [standard options] are:
-fPIE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.3.2 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.2