c++/9297: [3.2/3.3/3.4 regression] data corruption due to codegen bug (when copying.)

bangerth@dealii.org bangerth@dealii.org
Tue Jan 21 22:20:00 GMT 2003


Old Synopsis: data corruption due to codegen bug (when copying.)
New Synopsis: [3.2/3.3/3.4 regression] data corruption due to codegen bug (when copying.)

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Jan 21 22:05:21 2003
State-Changed-Why:
    Confirmed. This used to work until 3.0, but fails with 3.2,
    3.3 and 3.4. I'd think that this is a serious regression,
    being a wrong-code failure.
    
    To get rid of the string functions, here's a
    very slightly modified testcase that still fails:
    ---------------------------------#include <cassert>
    
    struct C {
        C(char const * s) {
          for (int i=0; i<sizeof(p); ++i) p[i]=s[i];
        }
    
        char p[64];
    };
    
    inline C make_c(C y) { return y; }
    
    int main(int argc, char * argv[])
    {
      C data("ABCDEF");
      assert(data.p[0] == 'A'); // OK
    
      C d1(data);
      assert(d1.p[0] == 'A'); // OK
    
      C d2( make_c(data) );
      assert(d2.p[0] == 'A'); // fail
    }
    ------------------------------
    
    W.

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



More information about the Gcc-bugs mailing list