diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-02-16 12:02:34 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-02-16 12:02:34 +0000 |
commit | 15adae8bbeb4579910eadf636e3b06f3dae4a342 (patch) | |
tree | f83cb47e62d224c62b42c71358c21782e8925d88 /libcpp/line-map.c | |
parent | a5a5010fe7021969848db8c5a787b71781be2201 (diff) |
2018-02-16 Richard Biener <rguenther@suse.de>
PR bootstrap/82939
* line-map.c (linemap_init): Avoid broken value-init when compiling
with GCC 4.2.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257732 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r-- | libcpp/line-map.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 677acd6dd92..a84084c99f0 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -344,7 +344,12 @@ void linemap_init (struct line_maps *set, source_location builtin_location) { +#if __GNUC__ == 4 && __GNUC_MINOR__ == 2 && !defined (__clang__) + /* PR33916, needed to fix PR82939. */ + memset (set, 0, sizeof (struct line_maps)); +#else *set = line_maps (); +#endif set->highest_location = RESERVED_LOCATION_COUNT - 1; set->highest_line = RESERVED_LOCATION_COUNT - 1; set->location_adhoc_data_map.htab = |