[Bug optimization/12786] New: -fvpt does not work with signed mod with a const of 0x80000000

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Oct 27 06:19:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: -fvpt does not work with signed mod with a const of
                    0x80000000
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org

Compile a program like this
gcc test.c main.c -fprofile-arcs -fvpt -O3
and run the resulting program and you will recieve an error:
profiling:/home/gates/pinskia/src/testl/test.gcda:Overflow merging
::::::::::::::
test.c
::::::::::::::
int mod(int i, int j)
{
        return i % j;
}
::::::::::::::
main.c
::::::::::::::
int mod(int,int);
int t;
int main()
{
        int j = 0x80000000;
        t = mod(0, j);
}



More information about the Gcc-bugs mailing list