diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a1eb039d88..f78ff93a9a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-03-23 Kyrylo Tkachov + + PR driver/70132 + * config/arm/driver-arm.c (host_detect_local_cpu): Reorder exit logic + to not call fclose twice on file. + 2016-03-23 Jakub Jelinek PR tree-optimization/70354 diff --git a/gcc/config/arm/driver-arm.c b/gcc/config/arm/driver-arm.c index 466743b9d47..95dc9d53b6c 100644 --- a/gcc/config/arm/driver-arm.c +++ b/gcc/config/arm/driver-arm.c @@ -128,12 +128,11 @@ host_detect_local_cpu (int argc, const char **argv) } } - fclose (f); - - if (val == NULL) - goto not_found; - - return concat ("-m", argv[0], "=", val, NULL); + if (val) + { + fclose (f); + return concat ("-m", argv[0], "=", val, NULL); + } not_found: {