[Bug fortran/67779] Strange ordering with strings in extended object
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 28 23:09:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67779
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu.org
--- Comment #10 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 37181
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37181&action=edit
simplified, instrumented test case
The problem happens in passing the array bounds.
The somewhat simplified (integer only) and instrumented test case shows the
following output:
Sorting ...
array on input
5 1 4 3 2
array after pretreatment
2 1 3 4 5
array recursively passed to quicksort
2 1 3
array on input
1 3 4
.... and this is off by one. The array slice passed should be
[ 2 1 3] and ends up as [1 3 4] in the called subroutine.
Well, I'm off to bed. I'm sure this can be simplified further.
array after pretreatment
1 3 4
array on input
1 3
array after pretreatment
1 3
More information about the Gcc-bugs
mailing list