Hi,

this patch fixes the last failed fortran test case on arm-linux-gnueabihf:
select_type_4.f90, which did always fail at -O2 and above.

It was caused by a strict aliasing violation, when passing a value of the type
"class(x),pointer" to a formal procedure parameter of the type 
"class(x),target".

The patch resolves this, by creating a temporary value of type "class(x),target"
which can be passed to the procedure without violating the strict aliasing 
rules.

Boot-strapped and regression-tested without any regressions
on x86_64-unknown-linux-gnu and arm-linux-gnueabihf.

OK for trunk?


Thanks
Bernd.
                                          
2014-04-11  Bernd Edlinger  <bernd.edlin...@hotmail.de>

        PR fortran/60718
        * trans-expr.c (gfc_conv_procedure_call): Fix a strict aliasing
        violation when passing a class object to a formal parameter which has
        the target attribute set.

Attachment: patch-pr60718.diff
Description: Binary data

Reply via email to