https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105542

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Yes, it is always usefule to have tests available.

I cloned the repository.

fpm build is happy.

$ fpm test
compiler_test.f90                      done.
usage_test.f90                         done.
main.f90                               done.
reference-counter-test                 done.
[100%] Project compiled successfully.
Running Tests

Test that
    The compiler
        finalizes a non-allocatable object on the LHS of an intrinsic
assignment
        finalizes an allocated allocatable LHS of an intrinsic assignment
        finalizes a target when the associated pointer is deallocated
        finalizes an object upon explicit deallocation
        finalizes a non-pointer non-allocatable array object at the END
statement
        finalizes a non-pointer non-allocatable object at the end of a block
construct
        finalizes a function reference on the RHS of an intrinsic assignment
        finalizes a specification expression function result
        finalizes an intent(out) derived type dummy argument
        finalizes an allocatable component object
    Using a reference-counted object
        creates a resource when constructed
        removes the resource when it goes out of scope
        a copy points to the same resource

A total of 13 test cases

At line 42 of file test/usage_test.f90
Fortran runtime error: Attempt to DEALLOCATE unallocated 'the_resource'
<ERROR> Execution failed for object " reference-counter-test "
<ERROR>*cmd_run*:stopping due to failed executions
STOP 1

Am I missing a step? This is with gfortran 12.

Reply via email to