diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-12-03 23:10:46 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-12-03 23:10:46 +0000 |
commit | dd2a16c741f11935fef856e29e6c71d27fd5c741 (patch) | |
tree | 4c28f5d062635533e12c89375ad9f4f26abf1d9f /gcc/ada/gcc-interface/utils.c | |
parent | 34dda8045231413589fd1ac4ecd6a9cc97b51278 (diff) | |
download | gcc-dd2a16c741f11935fef856e29e6c71d27fd5c741.zip gcc-dd2a16c741f11935fef856e29e6c71d27fd5c741.tar.gz gcc-dd2a16c741f11935fef856e29e6c71d27fd5c741.tar.bz2 |
re PR bootstrap/92783 (SEGV in field_byte_offset)
PR bootstrap/92783
* gcc-interface/utils.c (rest_of_record_type_compilation): Move down
the guard for the position of fields in the descriptive type.
From-SVN: r278948
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 7217eea..fa98a5a 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -2246,13 +2246,6 @@ rest_of_record_type_compilation (tree record_type) pos = compute_related_constant (curpos, last_pos); } - /* If we can't compute a position, set it to zero. - - ??? We really should abort here, but it's too much work - to get this correct for all cases. */ - if (!pos) - pos = bitsize_zero_node; - /* See if this type is variable-sized and make a pointer type and indicate the indirection if so. Beware that the debug back-end may adjust the position computed above according @@ -2273,6 +2266,13 @@ rest_of_record_type_compilation (tree record_type) } } + /* If we can't compute a position, set it to zero. + + ??? We really should abort here, but it's too much work + to get this correct for all cases. */ + if (!pos) + pos = bitsize_zero_node; + /* Make a new field name, if necessary. */ if (var || align != 0) { |