https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79431
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Feb 15 07:05:39 2017 New Revision: 245471 URL: https://gcc.gnu.org/viewcvs?rev=245471&root=gcc&view=rev Log: Backported from mainline 2017-02-09 Jakub Jelinek <ja...@redhat.com> PR c/79431 * gimplify.c (gimplify_adjust_omp_clauses): Ignore "omp declare target link" attribute unless is_global_var. * omp-low.c (find_link_var_op): Likewise. * c-parser.c (c_parser_omp_declare_target): Don't invoke symtab_node::get on automatic variables. * parser.c (cp_parser_oacc_declare): Formatting fix. (cp_parser_omp_declare_target): Don't invoke symtab_node::get on automatic variables. * c-c++-common/gomp/pr79431.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/c-c++-common/gomp/pr79431.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/c/ChangeLog branches/gcc-6-branch/gcc/c/c-parser.c branches/gcc-6-branch/gcc/cp/ChangeLog branches/gcc-6-branch/gcc/cp/parser.c branches/gcc-6-branch/gcc/gimplify.c branches/gcc-6-branch/gcc/omp-low.c branches/gcc-6-branch/gcc/testsuite/ChangeLog