[Bug fortran/81758] [OOP] Broken vtab

2017-10-15 Thread liakhdi at ornl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

--- Comment #6 from DIL  ---
It is not that I am not willing to, I just do not see an easy way to reduce the
relevant code. For now, I have attached a debugger screenshot (jpg above) to
show you the details of the problem. The segfault occurs when running the
binary test_gfc.x produced by the Makefile, specifically in the GFC::graph test
(gfc_graph.F90). In the bottom left corner of the .JPG file you will see the
exact callstack at the point of crash. In the central window, you will see the
line 742 of gfc_vector.F90, specifically:
val_p => cep%get_value(errc)
The pointer "cep" is class(gfc_cont_elem_t) defined in gfc_base.F90. Now if you
look at the right window on the .JPG where I inspect the content of the "cep",
you will see a completely messed up _vptr table, where the type-bound procedure
bindings are associated with wrong procedures from a completely unrelated type
"vector_t" from gfc_vector.F90. In particular, if you look at the "get_value"
binding, that is, the procedure we are trying to call in line 742 above, you
will see that it is wrongly associated with vector_t%vectorlowerbound, a
totally unrelated type-bound procedure from a different type. That's exactly
why the segfault occurs (please see the callstack). All other type-bound
bindings of "cep" are wrong as well, except maybe few.

[Bug fortran/81758] [OOP] Broken vtab

2017-10-15 Thread liakhdi at ornl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

--- Comment #7 from DIL  ---
P.S. I do not have GCC-8.0 installed anywhere.

[Bug fortran/81758] [OOP] Broken vtab

2017-10-15 Thread liakhdi at ornl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

--- Comment #5 from DIL  ---
Created attachment 42373
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42373=edit
Debugger screenshot

[Bug fortran/81758] [OOP] Broken vtab

2017-10-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

--- Comment #4 from Dominique d'Humieres  ---
Do you have access to a recent revision of trunk (8.0)? If yes, do you still
see the problem?

I understand that you are not willing to reduce your code. If yes, I have
managed to compile gfc_vector.F90, could you provide at least a driver showing
the problem?

[Bug fortran/81758] [OOP] Broken vtab

2017-08-08 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

Thomas Koenig  changed:

   What|Removed |Added

 Blocks||81748

--- Comment #3 from Thomas Koenig  ---
Could be a dup of 81748.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81748
[Bug 81748] extensible types non-conforming behaviour

[Bug fortran/81758] [OOP] Broken vtab

2017-08-07 Thread liakhdi at ornl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

--- Comment #2 from DIL  ---
No, at this point I do not, unfortunately. These OOP bugs tend to show up at
higher levels, so it is not always clear how to reduce it to something small. I
will try to reduce it to something smaller, but not sure how far. For example,
the current problem shows up in the implementation of a vector container
(gfc_vector.F90), but only when it is used to implement something more complex,
specifically the graph container in this case (gfc_graph.F90). The latter uses
three containers in its implementation: vector, list, and dictionary, so it
depends on all of those.

[Bug fortran/81758] [OOP] Broken vtab

2017-08-07 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758

Thomas Koenig  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-08-07
 CC||tkoenig at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Thomas Koenig  ---
Do you have a reduced test case that does not require understanding
your whole package?