Skip to content

Compilation fails with BOZ literal constant #1016

Open
@davidpfister

Description

@davidpfister

Description

I am trying to compile a code performing some SHA1 hashing. The code contains the following data

data(h0_ref(i), i=1, 5) / &
            z'67452301', &
            z'EFCDAB89', &
            z'98BADCFE', &
            z'10325476', &
            z'C3D2E1F0'/

when compiling with fpm using fpm build I get the following message

Error: BOZ literal constant at (1) is neither a DATA statement value nor an actual argument of INT/REAL/DBLE/CMPLX intrinsic subprogram [see '-fno-allow-invalid-boz']
compilation terminated due to -fmax-errors=1.
<ERROR> Compilation failed for object " src_SHA1.f90.o "
<ERROR> stopping due to failed compilation
STOP 1

I manage to compile my code if I pass the proposed flag option build --flag "-fallow-invalid-boz". However, there is a difference with ifort which compiles the same code without any problem and without specifying any additional flag.

Expected Behaviour

The code should compile with gfortran without passing additional flags just like it does with ifort

Version of fpm

0.10

Platform and Architecture

Windows

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions