[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3528.0. "5.5-017 compiler aborts" by CSC32::B_KNECHT () Fri Apr 04 1997 05:23

    I have a customer reporting an internal compiler error on Alpha 6.2
    with CXX 5.5-017 and a %VCG-F-BUGCHECK on a VAX with OVMS 6.2 and 
    CXX 5.5-017.  Below is the sample code and error.
    
    Looks like a comiler bug to me.  What do you think?
    
    Regards,
    
    Bob Knecht
    Colorado Customer Support Center
    
    
    
    
    Problem: CXX compiler aborts when destructor defined but not declared           
                                                                                    
    Environment:    CXX V5.5-017 (Alpha VMS or VAX VMS)                             
                    OpenVMS V6.2-1H3 (Alpha) or OpenVMS V6.2 (VAX)                  
                                                                                    
    Details:                                                                        
      The following example, when compiled with the $ CXX command,                  
      aborts the compiler on both VAX and Alpha.  If the commented                  
      line (the declaration of the destructor) is un-commented, it                  
      compiles properly.                                                            
                                                                                    
      On Alpha:                                                                     
                                                                                    
    | MCCA1::ESM> cxx main_dsnbug                                                   
    | Internal compiler error detected at line 3558 in file                         
    CSRC:[FE_COMMON]CMSYMTAB.H;1.
    | %SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual                   
    address=00000000, PC=001621D8, PS=0000001B                                      
    | %TRACE-F-NOMSG, Message number 0009804C                                       
    |   image    module    routine             line      rel PC          
    abs PC    
    |  CXX$COMPILER                               0 00000000001521D8                
    00000000001621D8                                                                
    |  CXX$COMPILER                               0 000000000015F408                
    000000000016F408                                                                
    |  CXX$COMPILER                               0 000000000018EC44                
    000000000019EC44                                                                
    |  CXX$COMPILER                               0 0000000000195050                
    00000000001A5050                                                                
    |  CXX$COMPILER                               0 000000000018C8EC                
    000000000019C8EC                                                                
    |  CXX$COMPILER                               0 00000000001A23D8                
    00000000001B23D8  
    |  CXX$COMPILER                               0 0000000000150790                
    0000000000160790                                                                
    |  CXX$COMPILER  GEM_CP_VMS  GEM_CP_MAIN   2509 00000000000015C4                
    000000000027EFE4                                                                
    |                                             0 FFFFFFFF89D6C170                
    FFFFFFFF89D6C170                                                                
                                                                                    
                                                                                    
      On VAX:                                                                       
                                                                                    
    | SLC::ESM> cxx main_dsnbug                                                     
    |         {}                                                                    
    | %VCG-F-BUGCHECK, Compiler bug check during front end phase .                  
    |                 Submit an SPR with a problem description.                     
    |                 At line number 5 in                                           
    USER_DISK_SLC2:[ESM.SCRATCH.CXX.HW4]MAIN_DSNBUG.CXX;3.
     |                                                                               
    |         {}                                                                    
    | %VCG-I-NOBJECT, No object file produced.                                      
    |                 At line number 5 in                                           
    USER_DISK_SLC2:[ESM.SCRATCH.CXX.HW4]MAIN_DSNBUG.CXX;3.                          
                                                                                    
                                                                                    
                                                                                    
    Sample code consists is as follows:                                             
                                                                                    
    File:  main_dsnbug.cxx                                                          
                                                                                    
    //                                                                              
    //  This crashes cxx compiler with no useful info.                              
    //  But if I remove '//?? ' from '//?? inline ~Dsnbug();' it works!             
    //            
                                                                                    
    #include <iostream.h>                                                           
                                                                                    
    class Dsnbug                                                                    
    {                                                                               
            public:                                                                 
      inline Dsnbug(const char* = "");                                              
    //?? inline ~Dsnbug();                                                          
            private:                                                                
      char* ptr;                                                                    
    };                                                                              
                                                                                    
    inline Dsnbug::Dsnbug (const char* p) : ptr(0)                                  
    {                                                                               
      p = p ? p : "";                                                               
      ptr = new char[strlen(p) + 1]; 
      strcpy(ptr, p);                                                               
    }                                                                               
                                                                                    
    inline Dsnbug::~Dsnbug()                                                        
    {                                                                               
      delete [] ptr;                                                                
    }                                                                               
                                                                                    
    int main ()                                                                     
    {}                                                                              
        
    
T.RTitleUserPersonal
Name
DateLines
3528.1Fixed in V5.6; try changing programDECCXX::MITCHELLMon Apr 07 1997 23:5411
The under-development V6.0 compiler diagnoses the following error:

cxx: Error: test.cxx, line 24: class "Dsnbug" has no member "~Dsnbug"
    inline Dsnbug::~Dsnbug()

-------------------^

Correcting the error should cure the compiler crash.  Granted, a
compiler crash isn't such a great way to diagnose an error.

This problem has also been fixed in V5.6.
3528.2Fixed in 5.6, thanks!CSC32::B_KNECHTWed Apr 09 1997 18:505
    
    Thanks for the update.  I'll let the customer know it is fixed in the
    	next release.
    
    Bob K.