Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Bad variable initialization in block causes ICE

IanH
Honored Contributor III
463 Views

Sometimes I forget what is permitted and what is not.  This is non-conforming code (says F2008 7.1.12p2), but ifort perhaps got more confused than it should.

PROGRAM MentalBlock
  IMPLICIT NONE
  BLOCK
    INTEGER :: array(2) = SIZE(array)
  END BLOCK
END PROGRAM MentalBlock

 

>ifort /check:all /warn:all /standard-semantics "2016-02-07 MentalBlock.f90"
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0 Build 20151021
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

101004_2042

catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in
 which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for 2016-02-07 MentalBlock.f90 (code 1)

 

A variant, that perhaps is conforming...

PROGRAM MentalBlockDeluxe
  IMPLICIT NONE
  BLOCK
    DIMENSION :: array(2)
    INTEGER :: array = SIZE(array)
  END BLOCK
END PROGRAM MentalBlockDeluxe

 

>ifort /check:all /warn:all /standard-semantics "2016-02-07 MentalBlockDeluxe.f90"
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0 Build 20151021
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

101004_2042

catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in
 which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for 2016-02-07 MentalBlockDeluxe.f90 (code 1)

.

 

0 Kudos
4 Replies
Steven_L_Intel1
Employee
463 Views

Thanks - I will send this off to the developers.

0 Kudos
Steven_L_Intel1
Employee
463 Views

Escalated as issue DPD200381580. Interestingly, if the declaration is not within a BLOCK the compiler accepts it, but shouldn't. 

0 Kudos
Steven_L_Intel1
Employee
463 Views

A further update. This usage is not standard F2008 but will be standard in F2015 (paper 15-194), which carved out an exemption for initialization expressions. I've asked our developers to make sure that standards warnings are handled appropriately for this.

0 Kudos
Steven_L_Intel1
Employee
463 Views

The ICE will be fixed in the final 17.0 release later this year.

0 Kudos
Reply