Bug 5837

Summary: bug in loop unrolling
Product: gcc Reporter: valera.veryazov
Component: fortranAssignee: Toon Moene <toon>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3    
Version: 3.0.4   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: main.f

Description valera.veryazov 2002-03-05 05:46:01 UTC
The code (see attachment) produces a Segnematation fault,
if flags " -O  -funroll-loops" are used.

Change of parameter to 12, 16 gives a correct result.
Also, a change of declaration Character *64 to, say,
Character*45 produces a funny number instead 0.

Removing -unroll-loops flag or using unrolling by hands
also 'fix' the problem.

Release:
3.0.4

Environment:
Linux Mandrake 8.1. GCC/G77 compiled from the source code.

How-To-Repeat:
just compile the code with -O  -funroll-loops flags.
Comment 1 Toon Moene 2002-04-13 07:23:52 UTC
Responsible-Changed-From-To: unassigned->toon
Responsible-Changed-Why: My job
Comment 2 Toon Moene 2002-04-13 07:23:52 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Apparently fixed for 3.1