Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

A block of ice

OP1
New Contributor II
973 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
605 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

0 Kudos
10 Replies
Steve_Lionel
Black Belt
957 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.

0 Kudos
JohnNichols
Valued Contributor III
938 Views

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

0 Kudos
andrew_4619
Honored Contributor II
931 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] )

 

0 Kudos
OP1
New Contributor II
923 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.

0 Kudos
andrew_4619
Honored Contributor II
911 Views

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

0 Kudos
JohnNichols
Valued Contributor III
901 Views

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

0 Kudos
andrew_4619
Honored Contributor II
893 Views

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

0 Kudos
Barbara_P_Intel
Moderator
855 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.



0 Kudos
JohnNichols
Valued Contributor III
838 Views

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

 

0 Kudos
Barbara_P_Intel
Moderator
606 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!



0 Kudos
Reply