This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 24741 - Internal compiler error (testcase: 27 lines)
Internal compiler error (testcase: 27 lines)
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-01-23 17:27 EST by Olivier Baudron
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-03 18:24:10 EST
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 Olivier Baudron 2001-01-23 17:27:22 EST
gcc is 2.96-70 and the testcase is:

/* ---------- testcase.c ----------*/

struct argp_option {
  int key; 

struct argp {
  __const struct argp_option *options;

extern __inline__ int
_option_is_short (__const struct argp_option *__opt) {
    return isprint (__opt->key);

struct group {
  void *hook;

int convert_options (const struct argp *argp, struct group *group) {
  const struct argp_option *opt = argp->options;

  if (_option_is_short(opt))
      return 0;

int _option_is_short (__const struct argp_option *__opt) {
    return 0;

/* ---------------- end ----------------- */

baud:~$ gcc -O2 -ggdb3 -c testcase.c  
testcase.c: In function `_option_is_short':
testcase.c:30: Internal compiler error in add_abstract_origin_attribute, at
Please submit a full bug report.
See <URL:> for instructions.
Comment 1 Olivier Baudron 2001-01-25 17:34:18 EST
I updated to gcc-2.96-71.i386.rpm and got the same problem.
Also, I can provide a shorter testcase, that crashes gcc, and this candidate is
certainly very close to the world record! :-)

/* ---------- testcase.c -------- */

extern __inline__ int f1 (int x) {
    return f2(0);

int f3 (int y) {
    if (f1(y)) return 0;

int f1 (int x) {
    return 0;

/* ----------- end --------------- */

baud:~$ gcc -O2 -ggdb3 -c testcase.c  
testcase.c: In function `f1':
testcase.c:14: Internal compiler error in add_abstract_origin_attribute, at
Comment 2 Olivier Baudron 2001-02-02 21:37:04 EST
Fixed in gcc-2.96-72.
Comment 3 Olivier Baudron 2001-02-02 21:46:34 EST
Huuuh..., sorry. I forgot kgcc was my default compiler.
gcc-2.96-72 doesn't fix the problem.
The following testcase makes an internal compiler error with flags: -O2 -ggdb3

extern __inline__ int f1 (int x) {return f2(0);}
int f3 (int y) {return f1(y);}
int f1 (int x) {return 0;}
Comment 4 Jakub Jelinek 2001-02-03 18:24:06 EST
Happens both with our 2.96 and CVS head, will try to debug this in the coming
Comment 5 Jakub Jelinek 2001-02-14 09:12:19 EST
Should be worked-around in gcc-2.96-75.

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