Patch Name: PHSS_20975 Patch Description: s700_800 11.00 HP aC++ (A.03.15) Creation Date: 00/01/27 Post Date: 00/01/31 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: HP aC++ A.03.15 Filesets: ACXX.ACXX,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: No Category Tags: defect_repair general_release Path Name: /hp-ux_patches/s700_800/11.X/PHSS_20975 Symptoms: PHSS_20975: 1. Throwing a bool is treated as an int 2. Need to be able to demangle local classes nested in functions 3. +inline_level 3 sometimes doesn't inline 4. TEMPLATES: bogus error 252 from typeid() code generation 5. TEMPLATES: Long template signature corrupts subsequent templates 6. TEMPLATES: member template out-of-line definition triggers bogus diag 7. TEMPLATES: template deduction has left to right dependency 8. TEMPLATES: missing default ctor for member not diagnosed 9. TEMPLATES: Deduction fails on expression templates (sl++) 10. TEMPLATES: bogus unsat when member class of template has vtable 11. ACCESS: Derived always has access to non-private base members 12. Signal 11 on virtual function, vtable is 0, only inline virtual func 13. Signal 11 processing initializer for array of class 14. Empty initializer lists {} not initialized correctly for auto 15. Inlined alloca fails if alloca isn't already in caller 16. string::at() doesn't do a Copy On Write 17. ToT: Private inheritance results in bad vtable initialization 18. Signal 11 in TypenameFixupAction::perform on return type 19. TEMPLATES: Static data member not initialized (fully) 20. Throw with nested try results in abort 21. __HP_aCC should contain version number 22. Error 641 may cause virtual call to be non-virtual 23. PCH: Assert in ImportExport.C with +hdr_use (anonymous enumeration) 24. TEMPLATES: Unfriendly message for '>>' t-arg terminator 25. Warning 823 on UINT32_MAX, for aC++ 26. RWTPtrSortedVector::index() doesn't return npos if not found 27. Core dump with +DA1.1 generated code virtual function with ... in shlib 28. Signal 11 on anonymous union in nested class of template in applyToNode 29. Signal 11 with string object in array of structs 30. Signal 11 on illegal friend class declaration 31. Signal 11 when trying to output ambiguity message 709 32. MEMBER TEMPLATES: wrong specialization invoked 33. Extra destructor called for array in try block 34. Warning 5004 on vector constructor for static_value 35. TEMPLATES: problem with out-of-line static const member initialization 36. MEMBER TEMPLATES: explicit arguments dropped when inside template decl 37. Disconnect between debug info and default args ctors 38. Problems if templete references incomplete struct that is completed 39. SIGABRT on second rethrow (in catch) 40. c++filt repeated function parms fail if in template class nested parms 41. Make error 93 illegal escape sequence, a future error 42. Need error 173 for member with same name as class 43. Error 106 unknown # commands, lower severity 44. Enclosing class should be in scope "class A::B : /*here A::*/ C {};" 45. Using declaration incorrectly suppresses sub-object ambiguity 46. Assert in Expand.C 2153 in compiler generated copy ctor 47. Bogus error 619 on wrong overloaded template function 48. Error 440 default argument fails when called from a template 49. Error 600 missing on friend function without return type 50. Error 22 with namespace scope operator, outside of namespace 51. Add +ESlit, at least for strings 52. type template static data member incorrectly changed 53. NEWLIB Error 710 & 870 with overloaded template function decl 54. Error 732 on template nested class 55. Error 176 const int X(1) not a treated as a const 56. Explicit specialization treated as inline if template is inline 57. PCH: precompiler headers cause stack overflow 58. Member template explicit instantiation gets unsat (or assert) 59. Signal 11 for template friend decl in parameterList 60. Signal 11 in convertDotArrowObjectPtr instead of error 187 61. A.01.21 reg: Unsat for static data in inline func 62. Signal 11 on virtual function, vtable is 0, only inline 63. Can't see global operators in namespace 64. Error 226 on string::copy not a const member function 65. get & getline don't store null char on EOF condition 66. Empty new initializer () doesn't initialize PODs 67. Error 226 function name not converted to bool 68. Error 5172 Backend Assert Unimplemented CVT, on (x=f()).y 69. Error 327 goto label doesn't work for certain cases 70. Signal 11 in Map::find with templates 71. Error 855 with same friends in different templates 72. Assertion in Statement.C, Line 237, insertBefore 73. Error 519 NON-type template arguments and 0 for pointer 74. (int*) cast doesn't increase alignment, poor +u1 code 75. Assert on string in template default arg, Signatures.C 76. Error 563 missing if first parm to operator new isn't size_t, in forward 77. NEWLIB: istream::getline eats blank lines, getline (,string) stops 78. Make-depend option to curb compile and print only dependencies on stdout 79. Assert on getAlignment in UC.MachineSpecificDetails.C on bad cast 80. ToT: Template unsat for static inline 81. Assert typename typedef in Expand.C 82. Assert in TypePackage.C on explicit destructor call 83. Signal 11 in replaceSubtree 84. Error 100 with -Y or other multibyte character corruption 85. Assert in Declaration.C operator mem-func of class in namespace 86. Error 100 with -Y, line splits in strings 87. Null pointer value isn't preserved on derived to base conversion 88. Error 172 friend & template problem 89. Error 519 should mention string literals not allowed 90. TEMPLATES: bogus future error 642 on baseclass 91. Error 283 on using declaration in template, function has dependent parm 92. NEWLIB Signal 11 on ctor try blocks optimizeInlineParameters 93. Assert on string ref initialization in Expand.C 94. +noeh should turn on -DRWSTD_NO_EXCEPTIONS for header files 95. NEWLIB Error 902 Temp deduction for friend function problem 96. +pa fails with Comdat and .tools_routines 97. Bad code generated when compiling with +O2 +DA2.0W 98. Bad code for inlined boolean function 99. Bad branch target in short-circuit evaluation, in inline function 100. aCC with -g -O and CTTI causes errors in DDE (empty LT_OFFSET) PHSS_20593: The list above is a superset of the fixes. PHSS_19478: The list above is a superset of the fixes. PHSS_17626: The list above is a superset of the fixes. Defect Description: PHSS_20975: 1. Throwing objects of type 'bool' are mistakenly caught by catch-clauses of type 'int' rather than type 'bool'. 2. Need to be able to demangle local classes nested in functions 3. +inline_level 3 sometimes doesn't inline 4. TEMPLATES: bogus error 252 from typeid() code generation 5. TEMPLATES: Long template signature corrupts subsequent templates 6. TEMPLATES: member template out-of-line definition triggers bogus diag 7. TEMPLATES: template deduction has left to right dependency 8. TEMPLATES: missing default ctor for member not diagnosed 9. TEMPLATES: Deduction fails on expression templates (sl++) 10. TEMPLATES: bogus unsat when member class of template has vtable 11. ACCESS: Derived always has access to non-private base members 12. Signal 11 may occur if a virtual function is called from a constructor. Virtual inheritance must be used. 13. Initialization of an array of structs, using the syntax foo[1] = {...}, where the struct contains a class object and an integer member, produces an internal problem at compile time. 14. The following declaration does not zero initialize the auto array: int a[3] = {}; 15. Inlined alloca fails if alloca isn't already in caller 16. RW implement string class using "copy on write" (COW) tech. However, there is a bug in the implementation of at() member function which allows modification of one string (say, s2) to affect another string (say s1) which was used to initialize the former. 17. ToT: Private inheritance results in bad vtable initialization 18. This stack-trace may occur when using "typename" in the return type of a member template function. 19. TEMPLATES: Static data member not initialized (fully) 20. Throw with nested try results in abort 21. Customers would like __HP_aCC to be set with the compiler version. 22. When attempting to recover from failed lookup at template definition time, the compiler forgets to consider polymorphic inheritance. In other words, it starts treating an unqualified name as a qualified one, thereby bypassing the virtual call mechanism. 23. Assert and gets Sig 11 on hdr_use. 24. TEMPLATES: Unfriendly message for '>>' t-arg terminator 25. Warning 823 and other errors will occur on UINT32_MAX. The token concatenation is not occurring. 26. The functions RWTPtrSortedVector::index() and RWTValSortedVector::index() don't return npos as documented, if it is < first element. It returns 0 instead. If in between elements it returns lower_bound. 27. Runtime aborts occur when compiling with +DA1.1 when a virtual function has ... and it is called from a shared library. 28. Signal 11 occurs in applyToNode when an anonymous union is declared in a nested class in a template. 29. Empty string constructor at end of initializer 30. The following illegal source causes signal 11: class A {friend class F;}; template class F {}; 31. A signal 11 may occur when trying to output an ambiguity error message 709. It is possibly that the error 709 should not appear either. 32. MEMBER TEMPLATES: wrong specialization invoked 33. Extra destructor called for array in try block 34. Warning 5004 may occur when optimizing when using vector constructor without specifying the default initial value. The vector elements are not set to their default values. The same thing occurs when using resize. 35. TEMPLATES: problem with out-of-line static const member initialization 36. MEMBER TEMPLATES: explicit arguments dropped when inside template decl 37. For the submitted test case, when a break point is set for the function fillList, the debugger does not break at the first statement of fillList. Instead, it breaks in the include file that contains the inline expansion of that statement. 38. Compiler either crashes or generates incorrect code for an pointer reference that depends on an incomplete (that is later completed) struct. The pointer is defined in a template class and the pointer's type uses an incomplete structure that is also lexically within the template class. 39. Signal 6 may occur if rethrowing from a catch clause after already rethrowing it once before in the caller of the current function. 40. c++filt may fail to demangle template functions with repeated parms. 41. Make error 93 illegal escape sequence, a future error 42. Undetected error: class X {int X;} 43. Error 106 unknown # commands, lower severity 44. Enclosing class should be in scope "class A::B : /*here A::*/ C {};" 45. Using declaration incorrectly suppresses sub-object ambiguity 46. Assert in Expand.C 2153 in compiler generated copy ctor 47. Bogus error on overloading while instantiating a template. 48. Error 440 default argument fails when called from a template 49. Error 600 missing on friend function without return type 50. Error 22 with namespace scope operator, outside of namespace 51. Add +ESlit, at least for strings 52. Bogus error + incorrect template instantiation (?) 53. NEWLIB Error 710 & 870 with overloaded template function decl 54. Template classes containing non-template member classes mistakenly get Error 732. 55. aC++ fails to honor const variables initialized with ()'s as constants. For example, line 3 below is flagged with an error saying an array must be declared using a constant value: 1 int main() { 2 const int max(10); 3 int array[max]; // invalid error 4 } 56. aCC mistakenly always treats function template specializations as inline when the generic function template is inline. E.g. template inline void f(T) { /* ... */} template<> void f<>(int) { /* ... */ } // inlined when it shouldn't be 57. PCH: precompiler headers cause stack overflow 58. Member template explicit instantiation gets unsat (or assert) 59. Signal 11 for template friend decl in parameterList 60. Mistakenly trying to access an enumerator value through an object that has a member of the enumerator value's enum type causes aCC to abort rather than producing the expected Error 187. Example: enum E { a, b }; struct S { E me; }; void f() { S s; s.a; // abort here } 61. Unsats occur for function scope statics in inline member function. 62. Use of an inline virtual function declared outside of the class with the inline keyword may cause aborts at runtime because the virtual table is not initialized. The class in question has protected derivation. 63. aC++ is performing the wrong kind of lookup for globally qualified operator calls, treating them very much like unqualified calls. 64. Error 226 may occur when using the string::copy member fuction on a const string object. 65. Use of istream::getline(ptr,) may not add a null character if it has an EOF. 66. aC++ fails to zero-initialize objects of POD (plain old data) type that are created via placement new. Example: new (mem) float(); // the 'float' object at address mem is garbage 67. Error 226 function name not converted to bool 68. An expression like the follow may cause the compiler to fail with Error 5172: (object1 = object2).member->memberFunction(); 69. A statment "goto label;" within a nested conditional or block scope where the label "label:" appears outside and after the "goto label;" statement will trigger a false error. 70. A signal 11 is encountered for the following code $ aCC -v -c ex.C template Out copy(In f,In l,Out r){ *r = *f; return r; } template It2 copy_backward(It1,It1,It2 r){ return r; } template struct os_list_iterator { T& operator*() const { return *pointer_; } T* pointer_; }; template struct os_list_const_iterator { const T& operator*() const { return *pointer_;} T* pointer_; }; template struct vector { vector& operator=(const vector&); T* end() { return 0; } const T* end() const { return 0; } void insert(T*); }; template vector& vector::operator=(const vector&) { insert(0); return *this; } template void vector::insert(T* pos) { copy_backward(pos, end(), end()); } typedef os_list_const_iterator > A; typedef os_list_iterator > B; template B copy(A, A, B); template int* copy_backward(int*, int*, int*); 71. Friend injection is incorrect. 72. Assertion in Statement.C, Line 237, insertBefore 73. Using 0 for a non-type template is not legal for pointer types. Error 519 will occur. template ... A<0> i; 74. If casting a local char array to an int*, poor +u1 code is generated. 75. A compiler assert may occur when illegally using a string in template default arg. 76. Error 563 missing if first parm to operator new isn't size_t, in forward 77. In the new Standard C++ Library getline(,string) stops on blank lines. istream::getline eats up the blank lines. 78. aCC has not make-depend options to prevent compile/preprocess AND print make-dependencies on stdout or any named file, not necessarily with ".d" suffix. 79. Casting a pointer-to-object to a pointer-to-function may trigger an assertion failure. typedef void (*ptrfun)(); ptrfun a = (ptrfun)"hello"; // aCC aborts 80. ToT: Template unsat for static inline 81. Assert typename typedef in Expand.C 82. A compiler assertion in TypePackage.C may occur on syntax like the following: tp[i].Type::~Type() where tp is a reference to a pointer to Type. 83. Compiler received signal 11 in replaceSubtree. 84. Error 100 with -Y or other multibyte character corruption 85. MemberFunction::classDecl asserts because the enclosing decl of the operator member function is the namespace the encloses its parent class instead of the parent class iteself. This problem does not occur for non-operator member functions. 86. Backslash-newline character sequences within quoted strings are not deleted when compiling with the -Y option. 87. The null pointer value isn't preserved on derived to base conversion where the compiler sees that the value is really 0. ostream *s = (ofstream*)0; Note there must be multiple base classes. 88. Error 172 friend & template problem 89. Error 519 should mention string literals not allowed 90. TEMPLATES: bogus future error 642 on baseclass 91. There are several ways to solve error 641 when referencing to members of a template base class. Either use "this->", use the base class as a qualifier, or use a using declaration specifying the base class member. The last method corrently does not work. In the fixed version, this works for data members and for most functions. But sometimes the following error may occur: Error 283 # Illegal operand type in call expression. It depends on the parameters to the function, I.e. if they are from another template. 92. Signal 11 may occur in optimizeInlineParameters when a function try block occurs in an inline function 93. Assert on string ref initialization in Expand.C 94. +noeh should turn on -DRWSTD_NO_EXCEPTIONS for header files 95. NEWLIB Error 902 Temp deduction for friend function problem 96. +pa (CXperf) profiling of aCC applications with template usage with the Compile Time template instantiation (CTTI) scheme fails 97. +O2 produces incorrect results in aCC program 98. Incorrect code is generated for an inline function with boolean expression: bool check() { return !iC && iD; } if (!check()) 99. If an inline function contains a simple boolean expression where one operand is a bool, bad code generation may occur. bool foo() { return bool_b || ptr; } This could fail for || or && and iwth the operands in any order. 100. Incorrect line number information is given if -g and -O are used for files with templates in them. PHSS_20593: The list above is a superset of the fixes. PHSS_19478: The list above is a superset of the fixes. PHSS_17626: The list above is a superset of the fixes. SR: 0000000000 Patch Files: ACXX.ACXX,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: /opt/aCC/bin/aCC /opt/aCC/lbin/ctcom /opt/aCC/lib/nls/msg/C/aCC.cat /opt/aCC/lib/nls/msg/C/aCC.msgs /opt/aCC/bin/c++filt /opt/aCC/lib/libdemangle.a what(1) Output: ACXX.ACXX,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: /opt/aCC/bin/aCC: HP aC++ B3910B A.03.15 HP aC++ B3910B X.03.14.06 Language Support Library /opt/aCC/lbin/ctcom: HP aC++ B3910B A.03.15 HP-UX SLLIC/OPTIMIZER UX.11.01.190: 09/27/99 linkstamp 12/17/99 10:36:23 HP aC++ B3910B X.03.14.06 Classic Iostream Library HP aC++ B3910B X.03.14.06 Language Support Library Ucode Code Generator - UX11.01.16 (PACG - September 27, 1999) REV: HP SESD Support Code High Level Optimizer - UX.11.00.990927 (UX11.01-CURR ENT) [-DHLO_RELEASE +noeh -z +O2 +Oinitcheck ] - 17-Dec-1999.10:27 Ucode-2 - UCODE2_UX11.01_STABLE(v2.1) (October 19, 1 998) 92453-07 linker command s800.sgs libelf PA64 B.11.15 .IZ1 REL 991016 /opt/aCC/lib/nls/msg/C/aCC.cat: None /opt/aCC/lib/nls/msg/C/aCC.msgs: None /opt/aCC/bin/c++filt: HP aC++ B3910B A.03.15 HP aC++ B3910B X.03.14.06 Language Support Library /opt/aCC/lib/libdemangle.a: HP aC++ B3910B A.03.15 cksum(1) Output: ACXX.ACXX,fr=B.11.01.06,fa=HP-UX_B.11.00_32/64,v=HP: 1426235555 225280 /opt/aCC/bin/aCC 4180489909 14419088 /opt/aCC/lbin/ctcom 1486608457 118569 /opt/aCC/lib/nls/msg/C/aCC.cat 2927939945 238974 /opt/aCC/lib/nls/msg/C/aCC.msgs 4172113160 49152 /opt/aCC/bin/c++filt 4148131220 23128 /opt/aCC/lib/libdemangle.a Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHSS_17626 PHSS_19478 PHSS_20593 Equivalent Patches: PHSS_20959: s700: 10.10 10.20 s800: 10.10 10.20 Patch Package Size: 14760 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHSS_20975 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHSS_20975.depot By default swinstall will archive the original software in /var/adm/sw/save/PHSS_20975. If you do not wish to retain a copy of the original software, use the patch_save_files option: swinstall -x autoreboot=true -x patch_match_target=true \ -x patch_save_files=false -s /tmp/PHSS_20975.depot WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHSS_20975.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHSS_20975.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHSS_20975.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None