RFH: Impose code-movement restrictions and value assumption (for ASYNCHRONOUS/Coarrays)
Mikael Morin
mikael.morin@sfr.fr
Thu Jul 14 18:36:00 GMT 2011
Hello,
On Wednesday 13 July 2011 15:46:37 Tobias Burnus wrote:
>
> void some_function(void);
>
> void
> sub (int *restrict non_aliasing_var)
> {
> *non_aliasing_var = 5;
> some_function ();
> if (*non_aliasing_var != 5)
> foobar_();
> }
>
Couldn't we simulate the desired behaviour with more than one decl, one of
them const qualified? Like so:
void
sub (int *restrict non_aliasing_var)
{
*non_aliasing_var = 5;
{
const int *non_aliasing_var_tmp = non_aliasing_var;
some_function ();
if (*non_aliasing_var_tmp != 5)
foobar_();
}
}
It would probably be a hell to implement however.
Mikael
More information about the Fortran
mailing list