http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56652



             Bug #: 56652

           Summary: Wrong code in O2 - if in inline function

    Classification: Unclassified

           Product: gcc

           Version: 4.7.2

            Status: UNCONFIRMED

          Severity: major

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: dominik.siatkow...@aldec.com.pl





Bug detected with gcc-4.7.2 on i386-linux-gnu



Attached example segfalts compiled with -O2 (or even with '-O1

-finline-small-functions -fstrict-overflow -ftree-vrp')

Works with -O1. Works also if compiled in one compilation unit.



Stepping thru code shows it enters

    if (count >= 0 && count < size)

in shift_right, where count is INT_MIN and size is 2.

Reply via email to