IV39402: INFINITE LOOP WITH -QIPA AND RELINK

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When compiling and linking with -qipa and relink, the comparison
    in the while loop (in the test case below) is not being
    satisfied which leads to an infinite loop.
    
    
    ===== COMPILE COMMAND:
    
    xlc_r -qutf -qcpluscmt  -O -qfdpr -qstrict -qlibansi
    -qinlglue -qmaxmem=8192 -qarch=ppc -qtune=balanced -qspill=2560
    -qsaveopt -qipa=level=0:inline=noauto -qlanglvl=stdc89
    -qlonglong -bcdtors:mbr::s -bweaklocal -q64 -brtl  -bbigtoc
    -qipa=relink -qdebug=timing -qpdf1=pdfname=test.pdf1
    -qipa=level=0 -lperfstat -lrt -lwlm -lpthread -lm test.c
    
    ===== TESTCASE:
    $ cat test.c
    #include <stdio.h>
    
    int main (int argc, const char* argv[] )
    {
            unsigned char a = 254;
            while( a != (unsigned char)255){
                    printf("counter: %d\n", (unsigned int)a);
                    a--;
            }
    }
    $
    
    
    ===== ACTUAL OUTPUT:
    Infinite loop
    
    
    ===== EXPECTED OUTPUT:
    No infinite loop
    

Local fix

  • N/A
    

Problem summary

  • USERS AFFECTED:
    Any user that has loop counters less than size int that
    overflow and the user invokes TPO via  -O3, -O4, -O5 or -qipa
    can be affected by this issue.
    
    PROBLEM DESCRIPTION:
    Loop normalization does not expect loop counters to overflow,
    and thus generates bad code.
    

Problem conclusion

  • The above issue has been corrected within the IPA component of
    the compiler.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV39402

  • Reported component name

    XL C/C++ FOR AI

  • Reported component ID

    5725C7200

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-08

  • Closed date

    2013-06-17

  • Last modified date

    2013-06-17

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IV40225 LI77596

Fix information

  • Fixed component name

    XL C FOR AIX

  • Fixed component ID

    5725C7100

Applicable component levels

  • RC10 PSY U860046

       UP C



Rate this page:

(0 users)Average rating

Document information


More support for:

XL C for AIX
Compiler

Software version:

12.1

Reference #:

IV39402

Modified date:

2013-06-17

Translate my page

Machine Translation

Content navigation