Patch-ID# 102955-09 Keywords: core dump cc -Dalign -O Synopsis: SPARCompiler C 4.0: C patch for Solaris 2.x Date: Oct/09/96 Solaris Release: 2.3 2.4 2.5 SunOS Release: 5.3 5.4 5.5 Unbundled Product: SPARCompiler C Unbundled Release: 4.0 Relevant Architectures: sparc BugId's fixed with this patch: 1223560 1226522 1227358 1228019 1225728 1227761 1226147 1226041 1234682 1237180 1240755 1239885 1244459 1240427 1243691 1246357 1246804 1247503 1249206 1246804 1224178 Changes incorporated in this version: 1224178 Patches accumulated and obsoleted by this patch: Patches which conflict with this patch: Patches required with this patch: Obsoleted by: Files included with this patch: bin/acomp lib/libp/libcx.a lib/libcx.a lib/libcx.so.1 bin/cg bin/iropt Problem Description: (Rev 9) 1224178 core dump at runtime with alloca() in SC3.0.1 cc and acc with -Dalign and -O (Rev 8) 1246804 globalizing weak variables for -g causes error in assembler (Rev 7) 1249206 Redundant load elimination algorithm generated erroneous code for a long long int expression. (Rev 6) 1243691: C++ 4.1 (SC4.0) cg dumps core 1246357: -dalign, -O2, and -KPIC create bug for Dassault 1247503: cg behaves differently for different optimization level - fails on 03 and 04. 1246804: globalizing weak variables for -g causes error in assembler (Rev 5) 1239885, 1244459: iropt SEG FAULT at xO4 when compiling programs with over 1000 routines. 1240427 -xO3 can generate incorrect code when formal parameter's address is taken. (Rev 4) 1226041 Multiplication of long long * long gives wrong answer 1234682 SC3.0.1 C preprocessor produces incorrect output file with sybdb.h header file 1237180 Bug in software pipelining optimization causing assertion failure in some cases when -xchip=ultra and -xarch=v8plus were used at high optimization levels 1240755 Code compiled if LANG is set to other value than C=> float values are wrong. (Rev 3) 1223560 unsigned long long ul; ul = (unsigned long long) (void *) 0xdeadbeef; When using the -Xt flag ul is assigned the the incorrect hex value: ffffffffdeadbeef The correct hex value is: 00000000deadbeef Using the -Xt flag, unsuffixed constants are not promoted past long. Thus, the value 0xdeadbeef when given the type long is a negative number. In the above code segment the compiler incorrectly optimized away the cast (void *). The result being the extension of the sign of a long value when promoting it to a unsigned long long. The compiler is corrected by this fix, so that it honors the cast (void *). (Rev 2) 1225728 compiler optimization eliminates real code 1226147 1227761 This is a bug in the software-pipelining( modulo scheduling) phase of the Backend Optimizer & Code Generator. The bug manifests when the software-pipelining phase is turned on ( under -xchip=ultra at optimization levels O3 and higher), and the loop stride resides in a register. 1227358 cg gives an incorrect assertion and dies. 1228019 Conversion of long double to double produced incorrect results for some values. (Rev 1) 1226522 cg gives unnecessary warnings on lduha and sta instructions Patch Installation Instructions: -------------------------------- Refer to the Install.info file for instructions on using the generic 'installpatch' and 'backoutpatch' scripts provided with each patch. Any other special or non-generic installation instructions should be described below as special instructions. Special Install Instructions: ----------------------------- None.