aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2019-05-09 10:18:23 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2019-05-09 10:18:23 +0000
commit1ccebd3f730f29178b1f31c9e355943931909f80 (patch)
tree9d73c066ac3a5a9ece2d7c4b6854aa4aee7c021f /gcc/cp
parent362e280d10c61bec13c1d02c11a1c4ac0846db7e (diff)
downloadgcc-1ccebd3f730f29178b1f31c9e355943931909f80.zip
gcc-1ccebd3f730f29178b1f31c9e355943931909f80.tar.gz
gcc-1ccebd3f730f29178b1f31c9e355943931909f80.tar.bz2
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 <paolo.carlini@oracle.com> PR c++/90382 Revert: 2018-04-26 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use min_location. /testsuite 2019-05-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/90382 2018-04-26 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/diagnostic/trailing1.C: New. From-SVN: r271032
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/decl.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9469602..2544e48 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2019-05-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/90382
+ Revert:
+ 2018-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (grokdeclarator): Fix value assigned to typespec_loc, use
+ min_location.
+
2019-05-08 Nathan Sidwell <nathan@acm.org>
Kill DECL_SAVED_FUNCTION_DATA .
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 7f19d4a..36014dc 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;