Bug 103963 - GCC 2.96 Internal compiler error in assign_stack_temp_for_type
GCC 2.96 Internal compiler error in assign_stack_temp_for_type
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
high Severity medium
: ---
: ---
Assigned To: Yevgen Grytsenko
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-09-08 10:10 EDT by Yevgen Grytsenko
Modified: 2007-03-27 00:09 EDT (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Yevgen Grytsenko 2003-09-08 10:10:32 EDT
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] = "";
        doit[0].list[1] = "";
        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:
Actual results:

Expected results:

Additional info:
Comment 1 Yevgen Grytsenko 2003-09-08 15:02:32 EDT
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 00:06:57 EDT
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.