This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/80850] Sourced allocate() fails to allocate a pointer
- From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 26 May 2017 22:43:21 +0000
- Subject: [Bug libfortran/80850] Sourced allocate() fails to allocate a pointer
- Auto-submitted: auto-generated
- References: <bug-80850-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80850
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
gfc::vector testing status: 0 (PASSED): Performance:
2172016.0660160840
gfc::tree testing status: 0 (PASSED): Performance:
773072.10385898117
gfc::dictionary testing status: 0 (PASSED): Performance:
323307.23290432733
Program received signal SIGSEGV, Segmentation fault.
0x000000300235c8ef in ?? ()
(gdb) bt
#0 0x000000300235c8ef in ?? ()
#1 0x0000000000405ffb in __gfc_vector_MOD_vectoriterelementvalue ()
#2 0x0000000000414826 in __gfc_graph_MOD_graphiterappendlink ()
#3 0x0000000000417836 in __gfc_graph_test_MOD_test_gfc_graph ()
#4 0x0000000000401a24 in MAIN__ ()
#5 0x000000000040137d in main ()
With latest gfortran trunk. I get the error consistently here.
Using source pointed to at original post.
With gdb:
Breakpoint 1, gfc_vector::vectoriterelementvalue (this=..., offset=0, ierr=0)
at gfc_vector.F90:733
733 function VectorIterElementValue(this,offset,ierr) result(val_p)
(gdb) n
743 val_p=>NULL(); cep=>this%element(offset,errc)
(gdb) n
744 if(errc.eq.GFC_SUCCESS) val_p=>cep%get_value(errc)
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x000000300235c8ef in ?? ()
Looks like you are giving an offset of zero, maybe it should be 1?