openmp: One omp_resolve_declare_variant followup
authorJakub Jelinek <jakub@redhat.com>
Fri, 29 May 2020 08:48:40 +0000 (10:48 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 29 May 2020 08:48:40 +0000 (10:48 +0200)
commit3d0675f3bb54b58903bc9214d05c8e6d20e5f313
tree01a1b75b44a9dd690339303f019ce15030be943a
parent43a4fc095e30188392cc42299c4081297e321104
openmp: One omp_resolve_declare_variant followup

As noticed by Arseny, I got the condition when to call the add removal hook
wrong wrong.  Fixed thusly.

2020-05-28  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/95315
* omp-general.c (omp_resolve_declare_variant): Fix up addition of
declare variant cgraph node removal callback.

* gcc.dg/gomp/pr95315-2.c: New test.
gcc/omp-general.c
gcc/testsuite/gcc.dg/gomp/pr95315-2.c [new file with mode: 0644]