Bug 859232 - The C compiler (cc) dies on a VERY simple program.
The C compiler (cc) dies on a VERY simple program.
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
16
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-20 16:45 EDT by Michael Monagan
Modified: 2012-09-21 04:46 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-21 04:46:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ccSQoup9.out file (requested to attach) (18.65 KB, application/octet-stream)
2012-09-20 16:45 EDT, Michael Monagan
no flags Details

  None (edit)
Description Michael Monagan 2012-09-20 16:45:22 EDT
Created attachment 615119 [details]
ccSQoup9.out file (requested to attach)

Description of problem:  Bug in C compiler 

Here is the C code

#include<stdio.h>
int main()
{ int i,j,a,b,p;
 a = 997; b = 23; p = 1048573;
 for( i=0; i<10000; i++ ) {
     a = a+b;
     for( j=0; j<10000; j++ ) { b ++; a += a*b; }
 }
 printf("a=%d\n",a);
}



Steps to Reproduce:
1.  compile with  cc -O3  <file.c>

  
Actual results:

divmul.c: In function ‘main’:
divmul.c:3:5: internal compiler error: in vect_create_epilog_for_reduction, at tree-vect-loop.c:3739
Please submit a full bug report, with preprocessed source if appropriate.


Expected results:   compile with no errors


Additional info:  It compiles okay with other orderings of code e.g.

#include<stdio.h>
int main()
{ int i,j,a,b,p;
 a = 997; b = 23; p = 1048573;
 for( i=0; i<10000; i++ ) {
     for( j=0; j<10000; j++ ) { b ++; a += a*b; }
     a = a+b;
 }
 printf("a=%d\n",a);
}
Comment 1 Jakub Jelinek 2012-09-21 04:46:41 EDT
Fixed in GCC 4.7, not going to update GCC 4.6 in F16 this late.

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