On 10/07/16 08:21, Jakub Jelinek wrote:
Hi!
During review of Martin's -fsanitize-use-after-scope patch, I've noticed
what I believe is a bug in #pragma acc declare support.
In particular, the oacc_declare_returns has been added next to the CLOBBER
additions, but the clobbers are guarded with many conditions, e.g. aren't
emitted with -fstack-reuse=none and many other conditions.
I believe the additions to that data structure aren't guarded by these
conditions, it is just for VAR_DECLs that aren't is_global_var and have
current_function_decl context.
I haven't tested this patch (can bootstrap/regtest it), but don't have time
to try to write a testcase for all the cases where the conditions matter.
thanks, your logic seems sound. I'll see what we can do about a test case.
nathan