This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/8730: [3.2/3.3 regression] Cannot compile C function inside other C function


Old Synopsis: Cannot compile C function inside other C function
New Synopsis: [3.2/3.3 regression] Cannot compile C function inside other C function

State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Wed Nov 27 17:46:00 2002
State-Changed-Why:
    Confirmed.
    
    The code seems to trigger two different bugs:
    
    The following distilled code snippet crashes gcc 2.95.x and 3.0.x:
    
    -------------------------snip here---------------------------
    void baz(int i);
    
    void foo(int i, int A[i+1])
    {
      int j=A[i];
      void bar() { baz(A[i]); }
    }
    -------------------------snip here---------------------------
    
    The error message (when compiled with "gcc -O -c") is:
    
    PR8730B.c: In function `foo':
    PR8730B.c:7: Internal compiler error in `instantiate_virtual_regs_1', at function.c:3881
    Please submit a full bug report. [etc.]
    
    But this problem was apparently fixed in gcc 3.1.
    
    The second problem is triggered with the following code snippet:
    
    -------------------------snip here---------------------------
    void foo()
    {
      void* bar(int i, int A[1][i]) { return A[0]; }
    }
    -------------------------snip here---------------------------
    
    The error message (when compiled with "gcc -c") is:
    
    PR8730A.c: In function `bar':
    PR8730A.c:3: internal compiler error: in expand_expr, at expr.c:6771
    Please submit a full bug report, [etc.]
    
    This snippet compiles with gcc 2.95.3, but crashes since 3.0.
    Therefore, we have a regression.
    (Checked on i686-pc-linux-gnu.)

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]