IBM Support

IY69527: IPA generates bad while loop in 64-bit mode

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The testcase calls a function which contains a while loop.
    The exit condition for the loop is when the two  variables
    are not-equal.   It should exit after the first iteration
    of the loop since the variable should be equal, and this is what
    occurs normally.   However, with -qipa and -q64 the program goes
    into an infinite loop.
    
    Compile commands:
    xlC -q64 -c main.c
    xlC -q64 -c func.c -qipa
    xlC -q64 main.o func.o
    
    #### func.c ###########
    void mytest(void)
    {
      unsigned int var1=2;
      int var2=1;
    
      if (var2 != var1)
        do
        {
          var1--;
          printf("@");
        }
        while (var1 != var2);
    }
    #### end of func.c ####
    
    
    #### main.c ###########
    int main()
    {
        mytest();
    }
    #### end of main.c  ###
    

Local fix

  • Make var1 an 'int' rather than 'unsigned int'
    If either -qipa or -q64 is not included the output is correct.
    

Problem summary

  •  Same as sumbitters
    

Problem conclusion

  •  fixed
    

Temporary fix

Comments

APAR Information

  • APAR number

    IY69527

  • Reported component name

    XLC AIX

  • Reported component ID

    5724I1000

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2005-03-24

  • Closed date

    2005-04-06

  • Last modified date

    2007-08-02

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

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

    LI70891 LI71004

Fix information

  • Fixed component name

    XLC AIX

  • Fixed component ID

    5724I1000

Applicable component levels

  • R700 PSN U812645

       UP07/08/02 I 1000

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGH2K","label":"XL C for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Document Information

Modified date:
20 August 2024