A fix is available
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
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 U858524
UP C
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.