c/9749: internal error and segmentation fault of gcc 3.2

liberti@ipnos.co.uk liberti@ipnos.co.uk
Tue Feb 18 21:56:00 GMT 2003


>Number:         9749
>Category:       c
>Synopsis:       internal error and segmentation fault of gcc 3.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 18 21:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Leo Liberti
>Release:        3.2
>Organization:
>Environment:
GNU/Linux 2.4.18 on a RedHat 8.0 distribution
>Description:
/* the following code causes gcc and g++ 3.2 to crash 
with an internal error. The code shouldn't compile
anyway, but neither should the compiler crash.
gcc 2.95.2 correctly reports the mistakes in the 
snippet */

int main(int argc, char** argv) {
        int nx = 2;
        void theerror(double a[][nx+1]);
        double** a = new double * [1];
        a[0] = new double [3];
        a[0][0] = 0;
        theerror(a);
        return 0;
}

void theerror(double a[][nx+1]) {
        a[0][0] = 1;
}
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list