APAR status
Closed as program error.
Error description
Product: Apex Ada Platform: Alpha Version: 4.2.2b plus patches Installed configuration is listed at the end of this file. Description: Generating bad code for call to C library function: The attached Timed_Io package is not working due to CG errors wi th 4.2.2b. The call to Select has bad parameters formed. OPTIMIZATION_LEVEL is 0. The code generated from 4.2.2b for the Select call is: Ret_Val := Selectio (Interfaces.Integer_32 (Fd + 1), Fd_Set'Unchecked_Access, null, null, Time_Out); -- Check returned status addl/v s1, 01, a0 ;a0 := s1 + 1 ldl a4, -020(s4) ;a4 := SEXT((s4 - 32)) ldl a5, -01c(s4) ;a5 := SEXT((s4 - 28)) bis zero, zero, a2 ;a2 := zero bis zero, zero, a3 ;a3 := zero ldq t12, 07da0(gp) ;t12 := (gp + 32160) trapb ;trap barrier jsr ra, (t12), 0a9c4 ;-? __select ldah gp, 01ffb(ra) ;gp := ra + 536543232 lda gp, -064bc(gp) ;gp := gp - 25788 bis zero, v0, t8 ;t8 := v0 if Ret_Val = -1 then The code generated for 4.0.0b is: Ret_Val := Selectio (Interfaces.Integer_32 (Fd + 1), addl/v s1, 01, a0 a0 := s1 + 1 lda a1, -018(s4) a1 := s4 - 24 lda a4, -020(s4) a4 := s4 - 32 bis zero, zero, a2 a2 := zero bis zero, zero, a3 a3 := zero ldq t12, 07ab8(gp) t12 := (gp + 31416) trapb trap barrier jsr ra, (t12), 06654 -? __select ldah gp, 01fee(ra) gp := ra + 535691264 lda gp, 07bd4(gp) gp := gp + 31700 bis zero, v0, t0 t0 := v0 if Ret_Val = -1 then You can see that the a1 register is not being set properly in th e 4.2.2b code (which is the recv fd set parameter). This causes a bad call to select and our application fails.
Local fix
Problem summary
Ada compiler incorrectly passing parameter by value rather than by reference.
Problem conclusion
For a subprogram with a non-Ada convention , the Ada compiler will not alter parameter passing conventions.
Temporary fix
Comments
APAR Information
APAR number
PK40952
Reported component name
ADA DEV EE UNIX
Reported component ID
5724G1501
Reported release
42L
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2007-03-09
Closed date
2007-03-19
Last modified date
2007-03-19
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
ADA DEV EE UNIX
Fixed component ID
5724G1501
Applicable component levels
R42L PSN
UP
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSMMQY","label":"Rational Ada Developer"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"4.2.L","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
19 March 2007