Bug 859232 - The C compiler (cc) dies on a VERY simple program.
Summary: The C compiler (cc) dies on a VERY simple program.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-20 20:45 UTC by Michael Monagan
Modified: 2012-09-21 08:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-21 08:46:41 UTC
Type: Bug
Embargoed:


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

Description Michael Monagan 2012-09-20 20:45:22 UTC
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 08:46:41 UTC
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.