Skip to content

GFortran flag -fcoarray=single triggers bug on array expansion in GFortran 15.1 #1153

Open
@krystophny

Description

@krystophny

Description

This is an upstream bug in GCC 15.1 (I haven't found a report yet, maybe someone has a hint?) that affects code where a factory / constructor is called inside a growing list. It is triggered when using the -fcoarray=single flag which is automatically used by fpm.

list = [list, new_token(TOKEN_WORD, buffer)]

Workaround: replace by

token = new_token(TOKEN_WORD, buffer)
list = [list, token]

Expected Behaviour

The code should compile as expected once the upstream bug is fixed.

Version of fpm

6908108

Platform and Architecture

Linux / x86_64

Additional Information

Should one disable -fcoarray=single for the affected GFortran versions until the bug is resolved upstream?

https://gist.github.com/krystophny/b1e1785249eacc188aa2851ed6fbe471
perazz/fortran-shlex#9

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