Bug 103963 - GCC 2.96 Internal compiler error in assign_stack_temp_for_type
Summary: GCC 2.96 Internal compiler error in assign_stack_temp_for_type
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.3
Hardware: i686
OS: Linux
high
medium
Target Milestone: ---
Assignee: Yevgen Grytsenko
QA Contact: Brian Brock
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-09-08 14:10 UTC by Yevgen Grytsenko
Modified: 2007-03-27 04:09 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-04 04:06:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Yevgen Grytsenko 2003-09-08 14:10:32 UTC
Description of problem:
I tried to compile some code (I do it by myself).
Here is the source code:


#include <stdio.h>

typedef struct _nsa_exec_container
{
        char *type;
        char *list[BUFSIZ];
        char *exec[BUFSIZ];
        char *opts[BUFSIZ][255];
        int resolved[255];
        char *domain;
} nsa_exec_container, pnsa_exec_container[255];

int main(void)
{
        pnsa_exec_container doit;

        doit[0].type = "NS";
        doit[0].list[0] = "1.1.1.1";
        doit[0].list[1] = "1.1.1.2";
        doit[0].list[2] = "ns1.localhost.net";
        doit[0].list[3] = "ns2.localhost.net";
        doit[0].exec[0] = "AddToMyServer";
        doit[0].opts[0][0] = "$domain";
        doit[0].opts[0][1] = "$redir";
        doit[0].opts[0][2] = "$redir";
        doit[0].opts[0][3] = "$redir";
        doit[0].resolved[0] = 1;
        doit[0].domain = "my_domain.com";

        return 0;
}


and doing `gcc -O2 -Wall a.c -i a' I received an error:
a.c: In function `main':
a.c:17: Internal compiler error in assign_stack_temp_for_type, at function.c:670
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

int main(void)
{
.......
line 17:          pnsa_exec_container doit;
.......
}

Version-Release number of selected component (if applicable):
GCC 2.96

How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:

Comment 1 Yevgen Grytsenko 2003-09-08 19:02:32 UTC
Sorry, to compile it you have to do: gcc -O2 -Wall a.c -o a  (not ... a.c -i 
a ...)

Comment 2 Richard Henderson 2004-10-04 04:06:57 UTC
Your main problem is that 
  sizeof(nsa_exec_container) == 8422404
and so
  sizeof(pnsa_exec_container) == 2147713020
which is going to fail even if the compiler didn't crash.

GCC 3.2 has fixed the crash and prints
  z.c:15: size of variable `doit' is too large



Note You need to log in before you can comment on or make changes to this bug.