PR fortran/99147 - Sanitizer detects heap-use-after-free in gfc_add_flavor
authorHarald Anlauf <anlauf@gmx.de>
Fri, 19 Feb 2021 19:21:27 +0000 (20:21 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 19 Feb 2021 19:21:27 +0000 (20:21 +0100)
commitaf027826292351218785f893d1c42fe28ae3ed9f
tree59bf8daee2f7966f07bcad158bc2412c20853e51
parent7d524a5de33910d7df7033c793afbad42444d2f5
PR fortran/99147 - Sanitizer detects heap-use-after-free in gfc_add_flavor

Reverse order of conditions to avoid invalid read.

gcc/fortran/ChangeLog:

* symbol.c (gfc_add_flavor): Reverse order of conditions.
gcc/fortran/symbol.c