Patch-ID# 101914-22 Keywords: C++ SPARCompiler SC3.0.1 Synopsis: SPARCompiler 3.0.1: C++ 4.0.1 patch for SunOS 4.X Date: May/04/98 Solaris Release: 1.0.1 1.0.2 1.1 1.1_U1 1.2 SunOS release: 4.1.1 4.1.2 4.1.3 4.1.3_U1 4.1.4 Unbundled Product: SPARCompiler C++ Unbundled Release: 4.0.1 Relevant Architectures: sparc Topic: Patch for template and general compiler problems. BugId's fixed with this patch: 1091637 1150966 1168887 1169960 1171109 1171575 1172054 1172082 1172596 1172763 1172854 1172892 1172960 1173166 1173221 1173307 1173308 1173618 1173700 1174107 1174129 1174766 1174831 1175000 1175021 1175259 1175397 1175436 1175460 1175595 1175777 1176211 1176218 1177096 1177348 1177393 1177634 1177758 1177788 1178057 1178122 1178598 1178612 1178660 1178735 1178971 1179034 1179111 1179503 1179601 1179622 1179624 1179628 1179979 1180086 1180105 1180321 1180373 1180418 1180564 1180748 1180760 1180869 1180926 1181110 1181253 1181311 1181400 1181492 1181544 1181895 1181948 1181969 1182286 1182324 1182603 1182658 1182685 1182712 1182748 1182836 1182934 1183189 1183252 1183283 1183372 1183447 1183462 1183507 1183508 1183509 1183634 1183900 1184004 1184122 1184409 1184497 1184667 1184772 1185086 1185564 1185583 1186141 1186201 1186231 1186310 1186403 1186565 1186567 1186695 1186880 1186940 1187473 1187592 1187600 1187952 1188185 1188214 1188320 1188663 1188682 BugId's fixed with this patch: 1188730 1188776 1188784 1188888 1188906 1188917 1189003 1189049 1189430 1189490 1189584 1189734 1189793 1189905 1190240 1190988 1191130 1191743 1192326 1192593 1192598 1193219 1193270 1193314 1193328 1193473 1193493 1193494 1193580 1193688 1193700 1193823 1193824 1193827 1193887 1194063 1194067 1194374 1194404 1194462 1194630 1194665 1195218 1195674 1195760 1196331 1196358 1196606 1196809 1196906 1196913 1197408 1197739 1198250 1198605 1198702 1198998 1199113 1199136 1200800 1201527 1201559 1201761 1201871 1201872 1202426 1202799 1202828 1203023 1203194 1203222 1203500 1204505 1205161 1205366 1205471 1206541 1206555 1206558 1207177 1207246 1207539 1207837 1209235 1209481 1209623 1209671 1209706 1210052 1210182 1210237 1210333 1210603 1210658 1210665 1210750 1210930 1210953 1211141 1211312 1211929 1212179 1212339 1212352 1212462 1212478 1212541 1212789 1212800 1212955 1213031 1213032 1213078 1213127 1213133 1213140 1213358 1213363 1213441 1213446 1213599 1213656 BugId's fixed with this patch: 1213684 1213757 1214557 1214585 1214645 1214743 1215060 1215601 1215879 1216169 1216294 1216333 1216361 1216382 1216467 1216476 1216805 1216888 1217077 1217132 1217445 1218033 1218111 1218264 1218268 1218327 1218502 1218678 1218709 1218955 1218956 1219576 1219746 1220068 1220351 1220784 1220831 1221080 1221322 1221463 1221636 1221746 1221784 1233181 1225498 1182572 1215408 1223150 1227133 1228791 1234253 1239249 1240555 1241209 1243278 1243311 1245226 1247567 1247609 1182572 1215408 1223150 1227133 1228791 1234253 1239249 1240555 1241209 1243278 1243311 1245226 1247567 1247609 1225498 1218889 1226041 1241169 1249437 1249530 1252133 1253162 1254431 1254473 1254898 1256287 1259124 1259493 1260259 1265054 1253454 1253543 1264715 1266434 4005681 4008948 4009400 1254851 Changes incorporated in this version: 1254851 NOTE: The following changes to templates: The template database manager has been upgraded to improve performance for template compilation. With this upgrade, the database format has changed slightly, enough to cause it to be incompatible with earlier releases. Because of this incompatibility, data currently stored in the database is unusable by newer compilers, and any instantiations which are required will automatically be regenerated. Although the formats are incompatible, no failures should occur because of this change. If the new compiler is used with an old-style database, the compiler and tdb_link will issue the following warning: Database corrupt or from an older compiler. Ignoring existing data. This warning will occur until the first link takes place and will not occur for subsequent compiles. If an older compiler is used against a new-style database, no warning will be issued, but the effect is the same, i.e., any existing data will be ignored. Patches accumulated and obsoleted by this patch: Patches which conflict with this patch: Architectures this patch is available for: sparc Other patches which conflict with this patch: This patch obsoleted by: Files included with this patch: CC READMEs/XCM.ps READMEs/c++ c++filt ccfe cdlink ctags dem ldx libC.a libC_p.a libC.sa.5.0 libC.so.5.0 libcomplex.so.5.0 libcomplex_p.a librwtool.a libtask.a libtask_p.a libdem.a libdem_p.a ptclean rpcgen tdb_link cg Problem Description: Bug Id Synopsis ------- -------------------------------------------------------- (Rev 22) 1254851 tdb_link segv s when locked out of shared template repository (Rev 21) 1253454 wrong code generated for inline function with deeply nested if stmt 1253543 bad N_FUN stab 1264715 libtask.a: delay(0) fails to schedule the next task - worked with c++/sc2.0.1 1266434 C++ compiler generates wrong error message and stops 4005681 C++4.1 compiler does not always generate necessary code for the def constructor 4008948 compiling w/intermediate files produces multiple declarations if src 4009400 C++ preprocessor truncate big macro expansion without any message (Rev 20) 1241169 Undefined symbols for re-used templates 1249437 C++ 4.1 template dependencies not resolved correct 1249530 4.0.1 -> 4.1 binary compatibility broken 1252133 C++ 4.1 cannot find template instantiations which 1253162 virtual base in a class with complicated inherita 1254431 Compiler failed if Templates.DB remain on C++4.1 1254473 C++: inline functions with nested if statements 1254898 C++4.1 generates invalid stabs 1256287 C++ 4.0.1, with 101914-16, gives signal 11 1259124 C++4.1 is generating too many destructor calls 1259493 Cust. is wondering why his code works fine with C 1260259 Bug with coverting 4 byte code to 2 bytes 1265054 Using C++4.1 on 2.5 strstream gets premature EOF (Rev 19) 1226041 multiplication of long long * long gives incorrect answer Keywords: (Earlier Revs) bug 1225498: No support for DNS-based domains in SCHOLARpass-licensing bug 1218889: domain licensing doesn't work w/ DNS; NIS is required. Earlier versions of this product implemented domain licensing such that NIS/NIS+ was required; DNS was not used. This was changed in the Solaris 2.x version of the product in the Developer Products 4.0 release, but was not changed in the Solaris 1.x version. No new licenses are required with this patch. Providing this enhancement only affects those sites with domain (ScholarPass or GoldPass) licenses. (Previous Revs) Bug Id Synopsis 1091637 arrays of classes with no destructors seem to leak memory 1150966 Wrong type for 'this' pointer (dbx print wrong info in "whatis" template class) 1169960 sizeof with bit field(illegal use) causes assertion when -sb option used 1171575 Bit field not initialized correctly 1172054 strstream::seekp(val) does not actually change the put pointer. 1172082 The compilation process gets killed with SIGSEGV for certain erraneous code. 1172763 Compiler ignores const version of overloaded operator 1172892 Bogus warning generated saying variable defined but not used, when it is 1172960 template generated symbol ld can not find 1173221 Bad vtable offset in case of mixed virtual/non-virtual multiple inheritance 1173618 No way to declare specialization of template class constructor. 1174107 functions add-vector and check_addr take intensive cpu resources 1174129 compiler does not correctly convert from float to double 1174766 Compiler flags redefinition of enum value 1174831 C++4.0/4.0.1 does not issue syntax error causing run-time core dump. 1175000 Copy constructor and assignment operator of class ios should be private. 1175259 Template instantiation fails in parallel make. 1175436 try statement causes some objects not to be destroyed 1175595 Assignment to const member crashes the compiler 1175777 long long not guarded in iostream.h on 4.x, problem with -nocx. 1176211 Can't initialize a static member of a 2 argument templated class. 1176218 Can't use non-inline templated derived class constructor. 1177096 Weaks in macros don't work with patched patch 101910-02. 1177348 missing 'const' in error message 1177393 Segv on assigning a volatile with a (non-simple) constant expression 1177634 +w warnings from strstream.h. 1177758 Destructors for temps improperly executed in flow-through case. 1177788 compiler hangs - function-like macro followed by "?" 1178057 assertion error in ccfe, prepexpression.cc 1178122 Problem with duplicate vtbls in user .o and template .o. 1178598 virtual functions with virtual base class doesnot pick right function. 1178612 Cafe does not set bit is_stcall in IR for functions returning a ptr to member func 1178660 Unnecessary ex_rethrow generated with const specification 1178735 A test program that is compiled with libtask.a from patch 101910-01 1178971 Compiler exits signal 11, shows wrong line when'default' used wrong 1179034 wrong error message when a function exist within a struct 1179111 Bug in libC_mtstubs. 1179503 bogus "ambiguity" error when a friend operator of the sibling class exists 1179601 assertion error with C++ 4.0.1 on Sun O.S. 4.1.x with -g 1179622 Incorrect error using multiple inheritance 1179624 Assertion error in ccfe, front/src/ftemplate.cc. 1179628 Compiler can't initialize a static template member with multi-arg constructor. 1179979 redundant entry in exception table for _ex_clean() 1180086 because _WCHAR_T is predefined, macro functions in don't compile 1180105 Tools.h++ doesn't link under JLE due to missing __mb_cur_max from libc 1180321 ccfe uses excessive swap space and coredumps 1180373 Runtime environment is not dealing with multiple inheritance. 1180418 ccfe cannot correctly use typedef defined in base template class 1180564 istreams get set to EOF when a SIGALRM happens. 1180748 ccfe: Assertion: (../../front/src/prepexpression.cc, line 37) 1180760 protocol references without definitions causes compiler SEGV 1180869 Const arrays gives multiply defined symbols after upgrade to C++ 4.0.1. 1181110 C++ derived class stab gets missing field descrip. for self-pointer. 1181253 Unexpected error from ccfe on legal code 1181311 incorrect branch in switch statement 1181400 Access modifier 'volatile' with C++ 4.0.1 1181492 Signal 11 while processing program. 1181544 -a (gen tcov info) is incorrect 1181895 User provided declaration of _vector_con_ causes compilation error 1181948 signal 11 when declaring classes in namespaces 1181969 C++ compiler is not handling the multiple inheritance properly. 1182286 Destructor of temporary object is called twice. 1182324 typedef in template confuses compiler 1182572 dynamic_cast cannot recognize the reference type 1182603 Can't free allocated memory when using exceptions 1182658 c++filt and dem don't demangle some symbols 1182685 abstract base class, virtual method call crash 1182712 rw/cstring.h uses name "SP", which gets clobbered by a macro. 1182748 Signal 10 while processing file, regression in C++ 4.0.1 patch compiler. 1182836 Compiler terminates with assertion message at arbitrary line in source. 1182934 Writing to a strstream moves the get (tellg) pointer. 1183189 recursive inline class member function dumps core 1183252 wrong description for -g0 in man page 1183283 wrong virtual function called with virtual derivation 1183372 Overloaded functions with different arguments do not compile 1183447 c++ 4.0.1 task routine o.forget() does not work correctly 1183462 Generating NSConstantString templates in compiler causes SEGV 1183507 Cannot initialize static data member for template class. 1183508 Typedef problem with templates. 1183509 Typedef scoping problem with classes. 1183634 sizeof union containing bitfield is incorrect 1183900 C++ 4.0.1 Error: not defined in inline constructor 1184004 template error when using unsigned int 1184122 undefined symbol in what appears to be a valid program 1184409 types nested inside templates were incorrectly processed in other templates 1184497 Compiler doesn't like typedef'd declarations used for function definitions 1184667 Bus Error when class browser is asked to browse certain template classes 1184772 ios formatting fails to print floating point numbers as printf(). 1185086 typedef of instantiated template not recognized. 1185564 Gets "Could not find a match" error when instantiating templates intermittently 1186141 C++ 4.0 compiler cannot operate class. 1186201 Warning: OS level 4.1.4 not in table -- using 4.1.1 include path in CC driver 1186231 C++4.0.1 patch#101910-04 introduce a new problem with -pto used. 1186310 Problem with two methods with same name returning different types. 1186403 Task library queue member function print() gives infinite loop 1186565 ambiguity between overloaded operator int() and overloaded oprtr class reference 1186567 destructor called for unconstructed object 1186695 C++ program won't compile without -g option w/ C++4.0.1. 1186880 C++ 4.0.1 core dumps when calling virtual void function. 1186940 signal 11 generated during template processing. 1187473 long double initialized with large integer constants are incorrect 1187592 The fstream class does not handle pipes (FIFO) properly. 1187600 program runs in wrong order if virtual inheritance is used 1188185 throwing multiply inheritted object can cause data corruption 1188214 assertion failure in multiple.cc while processing template. 1188320 Incorrect code generated for exception. local destructors not called. 1188663 Signal 10 while processing file with -g, line number 0. 1188682 No storage allocated for static member arrays 1188730 incorrect error on operator += using enumerated type 1188776 Overloading problem in C++ 4.0.1. 1188784 Uninitialized memory read causes customer's app to dump core 1188888 local objects not destroyed when exception is thrown from an inline function 1188917 Compiler - Signal 11 1189003 C++ compiler problem processing default arguments. 1189049 assertion error in bindutil.cc line 865. 1189430 Compiler reports bogus 'unusable' error during template compile with -pto 1189490 Could not find match on template instantiation 1189584 Virtual base class pointers in virtual bases can end up initialized twice 1189734 The exception handling does not properly unwind the stack. 1189793 Assertion: (../../front/src/emitinitializer.cc, line 80) 1189905 Template mechanism regenerates template unnecessarily. 1190240 missing parenthesis, but the preprocessor never retruns at compile time. 1190988 c++ 4.0.1 warns about implicit enum type conversion 1191130 ccfe core dumps (backtrace says in "flush_destructors") 1191743 C++ 4.0.1 (100910-05 applied) gets assertion error. 1192326 Problem specializing a method. 1192593 SEGV regression in test suite with fix for 1173940 in tdb_link. 1192598 No way to declare specialization of template class destructor. 1193219 Destructors don't get called after an exception is 'thrown' in constructor. 1193270 different flag results in different behaviors at run-time with code included 1193314 assertion error in ../../front/src/prepexpression.cc, line 37 1193328 CAFE 3.0.1 and after get includes rules wrong 1193473 Undefined vtbl error message is really confusing when used with ild. 1193493 virtual function gives signal ABRT at runtime 1193494 Assertion error: (../../front/src/emitexpression.cc, line 247). 1193580 Problem with binary data in iostreams 1193688 SLINE stabs strange when macro calls span source lines 1193700 demangler problem(?): operator function names truncated in where output 1193823 core dump on method call when using virtual inheritance at multiple levels 1193824 cast from double to unsigned long leads to core dump 1193827 'this' not valid when using multiple inheritance 1193887 -dalign causes doubles passed by value to not be double word aligned 1194063 compiler does not correctly handle arguments for static operator in templates 1194067 invalid error when processing templates 1194374 virtual function dumped core with ****Pure virtual function called message. 1194404 ccfe dumps exits with signal 11 on customer example 1194462 fstream .open behavior with ios::out worked at 3.0.1, is broken at 4.0.1 1194630 function incorrectly mangled/or unmangled 1194665 tcov gives incorrect execution count for C++ 4.0.1 1195218 creating aliases with pragma weak does not work 1195674 exception lists for shared object are MT-unsafe 1195760 label number not reset compiling template .o files 1196331 C++ 4.0.1: problem with overloaded user-defined conversions 1196358 Order of compiles and links in template using files causes link errors 1196606 Urand() returns a negative value linking with C++'s task library 1196809 Uninitialized field in ccfe (bug in initialization of var_descr) 1196906 assertion failure in bindfunc.cc 1196913 Cannot overload operators to distinguish enum from int 1197408 -xF generating N_FUN for inlines 1197739 Spurious C++4.0.1(template related?) linking errors? 1198250 SC3.0.1 CC is not compatible with JLE 1.1.4 (J-Solaris 1.1.2) 1198605 no error issued if a class has members of a pure virtual class 1198702 template functions are not declared static when using -pto 1198998 demangler (dem) should get rid of extra blanks 1199113 TDB_LINK doesn't re-use -I paths when regenerating templates 1199136 Non-ANSI behavior of header file, undefined RAND_MAX 1200800 Wrong virtual function is being called 1201527 virtual destructor and specialization give Undefined symbol __vtbl 1201559 behavior of unexpected() is different between C++ 4.0.1 and C++ 4.1 1201761 tdb_link does not pass the source file name when reinvoking CC for xprofile=use 1201871 regular expression class library pattern-matching not working correctly 1201872 ccfe won't generate operator=() when contained member has const 1202426 tdb_link produces link errors after successful links with no changes 1202799 Extraneous warning for pointer declarators in conversion operator 1202828 emit prototype stabs for (used) member-functions compiled non-g 1203023 regression in C++ 4.0.1 patch compiler when inlining 1203194 C++ assertion error occurs using "-g" option 1203222 use of cast operator leads to core dump 1203500 when constructor for tmp object throws exception, tmp object is destroyed 1204505 Signal 11 for member function definition of incomplete template class 1205161 C++ compiler does not properly handle bit fields that are 32 bits in width. 1205366 template definition stab missing in .o 1205471 Recompile of unchanged source results in undefined symbols 1206541 representation bug when initializing variable when with -O flag 1206555 Regeneration fails because of change in build directory 1206558 Unnecessary re-instantiations taking place, causing a redefinition error 1207177 template query says "Could not find symbol setNext on line 31" 1207246 Destructor invoked on an object that is not constructed (exception triggered) 1207539 -E does not predefine __RTTI_H 1207837 c++ template compilation reverses the order of includes 1209235 Multiple inheritance selects wrong virtual function 1209481 seems not possible to specialize a template member function const 1209623 "Assertion failed..src/decl.c " error message while compiling 1209671 Error:class::methode:already had a body defined when template const member 1209706 tdb_link does not preserve order of user file and library arguments for link 1210052 extra single quote within string is confusing tdb_link 1210182 invalid warning when returning char * from a function 1210237 c++ may issue an erroneous "label is not used" warning 1210333 c++ compiler hangs waiting on a signal 1210603 destructors called twice on object constructed once 1210658 compiler does not allow throw() on a pointer 1210665 assertion error in compiler when using -g 1210750 C++ 4.0.1 cannot handle conversion correctly 1210930 C++ 4.0.1 on Solaris 2.x getting Assertion errors 1210953 Compiler seems to get confused in the presence of complicated hierarchies. 1211141 bad stabs in simple exception testcase with -g -O 1211312 assertion failure in dbg_stcomm.cc 1211929 C++ compiler refuse to compile whereas C compiler compiles OK 1212179 Derived to base conversions not allowed for template arguments 1212339 C++ const references to static class data do not behave consistently 1212352 C++ 4.0.1 compiler SEGVs 1212462 assertion failure 1212478 invalid code generated for nested conditional operator expression with type cast 1212541 Undefined symbols (template) during recompilation 1212789 SEGV in compilation with 4.1 compiler 1212800 Specializations registered in template .state files 1212955 compiling/linking in 2 steps causes the linker to report undefined symbols 1213031 Error: could not find a match for constructor 1213032 C++ internal error -> Bad tword /OT(IFETCH, False), xlate() 1213078 Assertion error with C++4.0.1 at line of ../src/xlate.c 1213127 Different tdb_link errors when trying to link executable 1213133 different errors from tdb_link when trying to link 1213140 undefined symbols when trying to link 1213358 compiler error when using static data in a template class 1213363 Incorrect error Overloading ambiguity between "func" and "func" 1213441 compiler hangs using -pta option 1213446 compiling w/intermediate files produces multiple declarations if src file exists 1213599 throw in constructor causes termination 1213656 application dumped core with message : ****Pure virtual function called 1213757 Performance issue with template database manager 1214557 C++ 4.0.1 SparCompiler performs pointer casting inconsistently 1214585 incorrect stab processing by dbx 1214645 -sb compilation gives signal 11 when template opt contains specialization 1214743 demangler problem: dbx core dump on startup of C++ program 1215060 C++ compiler does not initialize global variables in shared libraries. 1215601 Reference parameter generated temp for global static const rather than binding t 1215879 At most two -ptr arguments are used even if more are supplied 1216169 Error in overloading template function with const parameters 1216294 incorrect error message Non-const function foo::operator bar&() for const object 1216333 ccfe goes into an infinite loop with latest C++ 4.0.1 patch levels 1216361 Problem in templates 'instantation of templates 1216382 core dump at runtime using non-virtual member func thru ptr to member func 1216467 Error when compiling STL example bcompos1 1216476 template database gives error about being locked by another process 1216805 Undefined symbol errors on rebuild of stl application 1216888 Fatal error in iropt when using -O3 1217077 problem compiling derived template classes 1217132 Test case passes with -g, fails without it 1217445 Signal 10 from ccfe compiling a STL test case with -g -xsb 1218033 Optimizer in C++ 4.0.1 dies. 1218111 assertion error in /front/src/emitexpression.cc 1218264 -dalign doesn't work for varargs, causing core dumps 1218268 Bad error message text for unexpected typename 1218327 RTC-detected reference to uninitialized memory 1218502 Double application of user-defined conversion undetected 1218678 C++ 4.0.1: exception cannot be caught by handler within shared library, coredump 1218709 Compiler assert error in template processing. 1218955 unitialized structure causes c++ to access arbitrary data; dbx reports rui 1218956 undefined symbols when recompiling an application 1219576 Compiling some modules with -g0 causes assertion violation 1219746 Compiler not properly type checking ?: 1220068 tdb_link running out of swap space 1220351 Compiler memory use blows up with some C++ files 1220784 Extra semicolon causes the compiler to issue a spurious error (regression) 1220831 C++ template instantiation does'nt occur for function defaulted parameters 1221080 Initialization of char bit-fields does not work correctly 1221322 complier accepts more template arguments than have been declared 1221463 Change of template source does actually force regeneration 1221636 spurious errors for inline function 1221746 Destructor does not call when link with -mt option. 1221784 spurious error with -g if extra semicolon is used 1233181 problem with exceptions in shared libraries on SunOS 4.x none add a _main entry point in libC which calls _cinit. 1215408 C++ templates truncated when stored in a library with ar 1223150 Inlined member function with multiple returns in if block is incorrect 1227133 Program compiling fine with +d fails to compile with inlining turned on. 1228791 Compiler fails to compile inline function, works fine w.o. inlining 1234253 prog doesn't call destructor routine but reuses memory calling prog to core dump 1239249 Performance of executables built by C++ 4.0.1 is worse than those built by 3.0.1 1240555 Wrong symbolic link was created in template database by patch 1241209 Program gets segs fault when not compiled with -g option 1243278 C++ compiler dies during link if ptrepository is locked by another user 1243311 C++ program core dumps with inlining enabled 1245226 Unneccessary re-instantiations taking place 1247567 -xarch not getting passed to cg correctly 1247609 code causes compiler to crash Other bugs fixed with this patch -------------------------------- Bug Id Synopsis 1171109 Compiler with -O2 option causes assertion failed error. 1173308 assertion failure in code generator compiling simple prog with -O. 1175397 Using FORTRAN optimization produces incorrect results. 1180926 cg botches 8 or 16 bit arithmetic. 1185583 optimizer moves assignment ahead from exception raise. Patch Installation Instructions: -------------------------------- Extract the patch-tarfile in /usr/lang (or wherever the product is installed) Other specific or unique installation instructions may also be necessary and should be described below. Special Install Instructions: ----------------------------- None.