Created attachment 661267 [details] f90 routines, two main programs, one with allocation, one without, one subroutine, two compile scripts (the names will make everything fairly obvious as to what goes with what) Description of problem: compiler messes up addressing with an allocatable real(16) array when code contains a function subroutine (subroutine can either be in C or in Fortran). When subroutine is not present, there is no problem. Version-Release number of selected component (if applicable): F17 3.6.8-2 gcc 4.7.2 How reproducible: compile and run the two routines uploaded. One uses a fixed array; the other an allocatable array allocated to the same size. Both use a single function to set values. Steps to Reproduce: 1. unpack the code and run the two compile scripts 2. execute the two executables, one noalloc and the other alloc 3. observe the segmentation error in the allocatable case Actual results: no allocation runs and prints values allocation bombs on the first store into the array Expected results: both routines should print a series of values Additional info: An x86_64 machine, F17 3.6.9-2, gcc 4.7.2 does not have the bug. Both routines compile and operate properly on that machine. On the x86 machine, if the subroutine is a C routine, with argument passed either by address or by value, the executable bombs when the array is allocatable.
Tracking upstream.