http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60937
Bug ID: 60937 Summary: -Os -fprofile-arcs breaks __attribute__((error())) Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: kirill at shutemov dot name Created attachment 32660 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32660&action=edit Reduced test case Use of -Os and -fprofile-arcs break __attribute__((error())) behavior on attached test case. It false-positively triggers compile time error: $ gcc -Wall -Os -fprofile-arcs -c -o mm/.tmp_gup.o gup.i gup.i: In function ‘__get_user_pages’: gup.i:29:44: error: call to ‘__compiletime_assert’ declared with attribute error: BUILD_BUG failed __compiletime_assert(); Switching to other optimization level (above 0) or remove -fprofile-arcs does not lead to that: $ gcc -Wall -O1 -fprofile-arcs -c -o mm/.tmp_gup.o gup.i $ gcc -Wall -Os -c -o mm/.tmp_gup.o gup.i