public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/114235] New: Object undefined is specific procedure for generic overload in abstract type
@ 2024-03-05 11:00 Bader at lrz dot de
  0 siblings, 0 replies; only message in thread
From: Bader at lrz dot de @ 2024-03-05 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114235
           Summary: Object undefined is specific procedure for generic
                    overload in abstract type
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Bader at lrz dot de
  Target Milestone: ---

Created attachment 57613
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57613&action=edit
test case for overloaded addition in an abstract type

The attached program fails with a segmentation fault. Compilation with 
gfortran-13 -g -fbacktrace -Wall -Wextra abstract_overload_01_pos.f90 
yields and executable the execution of which produces the following stack
trace:

Backtrace for this error:
#0  0x7faaea5408c0 in ???
#1  0x7faaea53fa75 in ???
#2  0x7faae9b8f03f in ???
#3  0x7faaeae012a3 in __mod_r_MOD_add_r
        at
/home/reinhold/a2832ba/Documents/fortran_tests/f03/object_oriented/generic_tbps/abstract_overload_01_pos.f90:38
#4  0x7faaeae01dc3 in p_t
        at
/home/reinhold/a2832ba/Documents/fortran_tests/f03/object_oriented/generic_tbps/abstract_overload_01_pos.f90:57
#5  0x7faaeae021ca in main
        at
/home/reinhold/a2832ba/Documents/fortran_tests/f03/object_oriented/generic_tbps/abstract_overload_01_pos.f90:44
Segmentation fault (core dumped)

Uncommenting the debug writeout in line 37 reveals that t2%vec is not allocated
contrary to the fact that the actual argument's component is indeed allocated
prior to invocation of the generic addition.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-05 11:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 11:00 [Bug fortran/114235] New: Object undefined is specific procedure for generic overload in abstract type Bader at lrz dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).