Linux*

inconsistent treatment of TYPE vs. REAL in 'stream' write with Intel big-endian I/O conversion

I'm seeing different bit patterns when I write a REAL variable to file as component of a TYPE as opposed to when it's just a REAL in stream output while using the -convert big_endian option.

Given the following small program, which opens a file in 'stream' access mode and the proceeds to write two REAL's:

$ cat stream-write.f90
PROGRAM foo
  IMPLICIT NONE
  TYPE bar
    real :: x
  END TYPE bar
  INTEGER, PARAMETER :: file_id = 20
  INTEGER :: ierror
  REAL :: y
  TYPE(bar) :: z

Deferred length string component: segmentation fault

In a project I am working on, I changed a fixed length string in a structure within a module to a deferred length string and the result was an internal compiler error (the code compiled and ran without issue before the change).  I cannot reproduce the internal compiler error with a simple case, but I do get a segmentation fault in the below program when it hits the WRITE() statement.  It is unclear to me what the issue is or if this is even related to the internal compiler error I was trying to reproduce.  When compiling with '-std03', I get "warning #5436: Overlapping storage initializatio

ifort 11.1 and O2 optimization: wrong results

Dear all,

The code in question:

!##################

! MODULE FOR TYPES

!##################

MODULE mod_types

  IMPLICIT NONE

  PRIVATE

  PUBLIC :: type_glob, type_geom, type_edge

  !-------------

  ! Type node

  !-------------

  TYPE type_node

     REAL :: X = 0.D0

     REAL :: Y = 0.D0

     

  END type type_node

 

Subscribe to Linux*