Fixes are available
March 2013 PTF for XL C/C++ for AIX, V12.1
XL C/C++ for AIX Fix Pack 4 (June 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 5 (September 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C/C++ for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 21 (January 2019 Update) for 12.1
APAR status
Closed as program error.
Error description
The following testcase attempts to use the "restrict" cv qualifier for a pointer to function but the usage is incorrect (line 2 and line 4). xlC compiler fails to identify the invalid usage on line 4 and also produces Internal Compiler Error if the test case is compiled at -O2. ===== TESTCASE: $cat xlc12_defect_invalidrestrict.c typedef void (* function_ptr_t)(void); inline void invoke_function(function_ptr_t __restrict__ function) { } inline void invoke_function2(void (* __restrict__ function)(void)) { } void some_function(void) { signed main(void) { invoke_function(&some_function); invoke_function2(&some_function); return 0; } ===== ACTUAL OUTPUT: $xlC -+ xlc12_defect_invalidrestrict.c "xlc12_defect_invalidrestrict.c", line 2.13: 1540-2606 (W) "restrict" can only qualify a pointer or reference type. The "restrict" keyword is ignored. $ $xlC -+ xlc12_defect_invalidrestrict.c -O "xlc12_defect_invalidrestrict.c", line 2.13: 1540-2606 (W) "restrict" can only qualify a pointer or reference type. The "restrict" keyword is ignored. 1500-004: (U) INTERNAL COMPILER ERROR while compiling ----. Compilation ended. Contact your Service Representative and provide the following information: Internal abort. For more information visit: http://www.ibm.com/support/docview.wss?uid=swg21110810 ===== EXPECTED OUTPUT: Issue warning messages for both line 2 and 4, and do not produce Internal Compiler Error with -O.
Local fix
Correct the test case syntax.
Problem summary
PROBLEM DESCRIPTION: The compiler allowed an invalid use of restrict on a pointer to function USERS AFFECTED: users of the restrict keyword on a pointer to function
Problem conclusion
The problem has been resolved
Temporary fix
Comments
APAR Information
APAR number
IV35414
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 / Xsystem
Submitted date
2013-01-16
Closed date
2013-03-12
Last modified date
2013-03-13
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C/C++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
RC10 PSY UP
C
Document Information
Modified date:
21 August 2024