From: Paolo Carlini Date: Thu, 9 May 2019 10:18:23 +0000 (+0000) Subject: re PR preprocessor/90382 (ICE in linemap_macro_map_loc_to_exp_point, at libcpp/line... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ccebd3f730f29178b1f31c9e355943931909f80;p=gcc.git re PR preprocessor/90382 (ICE in linemap_macro_map_loc_to_exp_point, at libcpp/line-map.c:1061) /cp 2019-05-09 Paolo Carlini PR c++/90382 Revert: 2018-04-26 Paolo Carlini * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location. /testsuite 2019-05-09 Paolo Carlini PR c++/90382 2018-04-26 Paolo Carlini * g++.dg/diagnostic/trailing1.C: New. From-SVN: r271032 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9469602c5f5..2544e48c7d2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2019-05-09 Paolo Carlini + + PR c++/90382 + Revert: + 2018-04-26 Paolo Carlini + + * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use + min_location. + 2019-05-08 Nathan Sidwell Kill DECL_SAVED_FUNCTION_DATA . diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7f19d4a0b38..36014dc628e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -10423,8 +10423,8 @@ grokdeclarator (const cp_declarator *declarator, location_t typespec_loc = smallest_type_quals_location (type_quals, declspecs->locations); - typespec_loc = min_location (typespec_loc, - declspecs->locations[ds_type_spec]); + if (typespec_loc == UNKNOWN_LOCATION) + typespec_loc = declspecs->locations[ds_type_spec]; if (typespec_loc == UNKNOWN_LOCATION) typespec_loc = input_location; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f03c44582fd..98e102b0d66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-05-09 Paolo Carlini + + PR c++/90382 + 2018-04-26 Paolo Carlini + + * g++.dg/diagnostic/trailing1.C: New. + 2019-05-09 Richard Biener PR tree-optimization/90395 diff --git a/gcc/testsuite/g++.dg/diagnostic/trailing1.C b/gcc/testsuite/g++.dg/diagnostic/trailing1.C deleted file mode 100644 index 369781e56d5..00000000000 --- a/gcc/testsuite/g++.dg/diagnostic/trailing1.C +++ /dev/null @@ -1,5 +0,0 @@ -// { dg-do compile { target c++11 } } - -int const foo1() -> double; // { dg-error "1:.foo1. function with trailing return type" } -int volatile foo2() -> double; // { dg-error "1:.foo2. function with trailing return type" } -int const volatile foo3() -> double; // { dg-error "1:.foo3. function with trailing return type" }