c++/8936: Declaration of never defined member function changes generated code

bangerth@dealii.org bangerth@dealii.org
Thu Dec 19 17:03:00 GMT 2002


Synopsis: Declaration of never defined member function changes generated code

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Dec 19 17:03:48 2002
State-Changed-Why:
    I can confirm this, and it happens with all versions of
    gcc up to the present mainline after the BIB merge.
    
    The effect can be traced back to the case with no 
    optimizations switched on. There, in foo we have at
    the beginning
    	subl	$24, %esp
    where we have at the beginning of bar:
    	subl	$72, %esp
    Otherwise the code is identical (apart from the obvious
    changes in addressing local variables relative to ebp).
    
    Why so much stack space is allocated remains a mystery to
    me, but since the difference in stack allocation is the
    only thing that remains constant the more optimizations
    we switch on, this would indeed be interesting to
    investigate.
    
    The existence of a copy constructor (that is indeed not
    used here) changes something in data structures that
    should not even be used here. I thought a moment about
    exception handling, but declaring the copy constructor
    with throw() does not change anything.
    
    I don't think I can be of further help, but this would be
    something well worth fixing!
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8936



More information about the Gcc-bugs mailing list