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.

Bogus error with PROTECTED attribute

Harald
Beginner
448 Views

Hello,

there is a strange problem when the PROTECTED attribute is used before the actual variable declaration.

Example:

module ifc_protected
  implicit none
  private
  public :: x
  !----------
  protected :: x  ! Error here
  real      :: x
  protected :: x  ! OK here
end module ifc_protected

With the Intel v15 compiler I get:

% ifort -V -c ifc_protected.f90 
Intel(R) Fortran Compiler XE for applications running on IA-32, Version 15.0.5.223 Build 20150805
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

 Intel(R) Fortran 15.0-1818
ifc_protected.f90(6): error #6406: Conflicting attributes or multiple declaration of name.   
  protected :: x  ! Error here
---------------^
compilation aborted for ifc_protected.f90 (code 1)

Commenting out the first PROTECTED makes the error go away.

Thanks,

Harald

 

0 Kudos
1 Reply
Kevin_D_Intel
Employee
448 Views

Thank you for reporting this. I submitted it to Development.

(Internal tracking id: DPD200376539)

0 Kudos
Reply