C/C++ and Fortran


Operating Systems

The core of your mission-critical workloads: AIX, IBM i, and Enterprise Linux


ISV Solutions

Stay up to date with key capabilities running on POWER such as SAP

Business Continuity

Learn how to keep critical processes running and adapt quickly with PowerHA


Power Security

Protect your most sensitive data anywhere in your hybrid cloud


Check here for virtualization and management needs: HMC & CMC, PowerVC, and PowerVM

Open Source

Join our open source efforts within the IBM Power Systems portfolio

Enterprise Infrastructure as a Service

Achieve business growth with agility and flexibility with our enterprise IaaS in Power Virtual Server

Programming Languages

The hub for Programming Languages

Expand all | Collapse all

Internal compiler error with GOTOs in IBM XL C/C++ for Linux 16.1.1 Community Edition

  • 1.  Internal compiler error with GOTOs in IBM XL C/C++ for Linux 16.1.1 Community Edition

    Posted Fri October 09, 2020 02:05 PM
    (Apologies if this should have been posted in the IBM Support forums, or elsewhere.)

    Hi all,

    I have access to an installation of IBM XL C/C++ for Linux 16.1.1 on a POWER9 server running Ubuntu 18.04.3, and think I've found an internal compiler error bug; however, I'm unsure as to how to report it properly given that:

    • the compiler is a Community Edition and has no support contract;
    • the compiler is missing fixpacks (it reports as 16.01.0001.0000) and I haven't been able to get an updated version installed.

    The minimised input that triggers the bug is this (compiling with 'xlc -c NAME.c'):

    int a; void b(void) { goto c; if (!(a && 0)) ; else c: ; }

    Sample output:

    $ xlc -v -c foo2.c
    exec: export(export,XL_CONFIG=/opt/ibm/xlC/16.1.1/etc/xlc.cfg.ubuntu.18.04.gcc.7.3.0:xlc,NULL)
    exec: export(export,XL_ASMOBJFILES=/tmp/xlcASOcrWuA,NULL)
    exec: export(export,XL_DIS=/opt/ibm/xlC/16.1.1/exe/dis -o "foo2.s" "foo2.o",NULL)
    exec: /opt/ibm/xlC/16.1.1/exe/xlCentry(/opt/ibm/xlC/16.1.1/exe/xlCentry,-qosvar=ubuntu.18.04,-qalias=ansi,-qthreaded,-D_REENTRANT,-D__VACPP_MULTI__,-qtls,-q64,-D_CALL_SYSV,-D__NO_MATH_INLINES,-D_CALL_ELF=2,-Wno-parentheses,-Wno-unused-value,-maltivec,-qtls,-q64,-qgnu_version=7.3.0,-xc,-qasm_as=/usr/bin/as,-qc_stdinc=/opt/ibm/xlsmp/5.1.1/include:/opt/ibm/xlsmp/5.1.1/include:/opt/ibm/xlmass/9.1.1/include:/opt/ibm/xlC/16.1.1/include,-qgcc_c_stdinc=/opt/ibm/xlC/16.1.1/include:/usr/local/include:/opt/ibm/xlC/16.1.1/include:/usr/include/powerpc64le-linux-gnu:/usr/include,-qcomplexgccincl=/opt/ibm/xlsmp/5.1.1/include:/opt/ibm/xlmass/9.1.1/include:/opt/ibm/xlC/16.1.1/include:/opt/ibm/xlC/16.1.1/include:/usr/local/include:/opt/ibm/xlC/16.1.1/include:/usr/include/powerpc64le-linux-gnu:/usr/include,-qvac_include_path=/opt/ibm/xlC/16.1.1/include,-ofoo2.o,foo2.c,/tmp/xlcW0tmRe9W,/tmp/xlcW1IivMVu,/dev/null,/tmp/xlcLuq0yh8F.lst,/dev/null,/tmp/xlcW2QDckI2,NULL)
    /opt/ibm/xlC/16.1.1/bin/.orig/xlc: error: 1501-230 Internal compiler error; please contact your Service Representative. For more information visit:
    unlink: /tmp/xlcASOcrWuA
    unlink: /tmp/xlcLuq0yh8
    unlink: /tmp/xlcW0tmRe9W
    unlink: /tmp/xlcW1IivMVu
    unlink: /tmp/xlcW2QDckI2

    The ICE seems to persist if I move the variable 'a' into the function, declare it with particular values, etc. The variable, GOTO, and label all need to be there, and flipping the conditional or trying to simplify it seem to make the bug disappear.

    If I manage to get access to an fixpacked version of the compiler, I'll make sure to try again in case the fixpack fixed this issue.  A quick poring over of the fixpack notes didn't cause anything to jump out at me, though.

    Matt Windsor

  • 2.  RE: Internal compiler error with GOTOs in IBM XL C/C++ for Linux 16.1.1 Community Edition

    Posted Tue October 13, 2020 02:58 AM
    Thanks for reporting this issue.   We have reproduced it and already opened an internal defect for tracking.  Thanks.