Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.

A block of ice

OP1
New Contributor II
592 Views

This triggers an ICE with ifort 2021.5.0.

The workaround is obvious (don't name a block after a variable name!) but I thought I would report the ICE nonetheless.

PROGRAM P
INTEGER :: I
I : BLOCK
END BLOCK I
END 

Now, if the declaration for I is removed (using implicit typing for I, as shown below), the whole thing compiles without issue. It's probably an additional bug, although I am not sure about what the standard says about block construct names colliding with the names of variables or parameters. Somebody may want to chime in here.

PROGRAM P
I : BLOCK
END BLOCK I
END 

 

0 Kudos
1 Solution
Barbara_P_Intel
Moderator
224 Views

This block of ICE is fixed in the latest compiler release. Both ifort and ifx now print the error message without the ICE.

These compilers are included in oneAPI 2022.3.

Give them a try!



View solution in original post

10 Replies
Steve_Lionel
Black Belt Retired Employee
576 Views

The identifier for a named construct is a "Class (1)" local identifier and cannot share a name with a local variable. Your second example doesn't have any variables, so no problem.

JohnNichols
Valued Contributor II
557 Views

Why does this not trigger an error instead of an ICE -- just wandering

andrew_4619
Honored Contributor II
550 Views

I get error #6444: Not a valid construct name. [I]

Before Fatal: There has been an internal compiler error (C0000005)

So not so bad IMO.....

( Fortran Compiler Classic 2021.5.0 [Intel(R) 64] )

 

OP1
New Contributor II
542 Views

@Steve_Lionel , yes, I should have thought twice before posting my second example, ha ha.

 

I am not too concerned by the bug (after all as noted by @andrew_4619 the compiler is nice enough to issue an error before ice-ing). I just report this in the spirit of completeness.

andrew_4619
Honored Contributor II
530 Views

But no ICE with the same code for a named DO loop or ASSOCIATE construct  only with BLOCK. 

JohnNichols
Valued Contributor II
520 Views

God, Santa and Dr Fortran work in mysterious ways is the best answer to the unsolvable unknown. 

andrew_4619
Honored Contributor II
512 Views

ASSOCIATE is F2003, BLOCK is F2008 so a later code addition. Bugs come with adding or changing things......

Barbara_P_Intel
Moderator
474 Views

Hate a block of ice unless it's in an iced coffee!

I filed a bug for this, CMPLRIL0-34580. I'll let you know when it's fixed.



JohnNichols
Valued Contributor II
457 Views

Some recent research work shows that caffeine is an insecticide.   Still I prefer my fix in a a red can.  

 

Barbara_P_Intel
Moderator
225 Views

This block of ICE is fixed in the latest compiler release. Both ifort and ifx now print the error message without the ICE.

These compilers are included in oneAPI 2022.3.

Give them a try!



Reply