This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/61562] New: Compiler crash when combining -Wstrict-overflow=4 -O2


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61562

            Bug ID: 61562
           Summary: Compiler crash when combining -Wstrict-overflow=4 -O2
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zweije at xs4all dot nl

Created attachment 32974
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32974&action=edit
Test output

gcc-4.9 crashes when combining -Wstrict-overflow=4 and -O2 on the following
code snippet:

void f() {
 unsigned char x = 0;
 (x * 185) % 256;
}

Also crashes when compiled as .cpp.

Test output attached.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]