aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-unswitch.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-12-07 10:30:05 +0100
committerEric Botcazou <ebotcazou@adacore.com>2020-12-07 10:30:05 +0100
commit02221bed3c4912d59a865fa69bf12f54c980f957 (patch)
tree67907c13a70d472e0899f65b4528d0a27de2b127 /gcc/tree-ssa-loop-unswitch.c
parent090abb0f51b5cf8ce46fb686bc4b968f6e2055be (diff)
downloadgcc-02221bed3c4912d59a865fa69bf12f54c980f957.zip
gcc-02221bed3c4912d59a865fa69bf12f54c980f957.tar.gz
gcc-02221bed3c4912d59a865fa69bf12f54c980f957.tar.bz2
Fix corner case issue with discriminated record type
The compiler generates code that writes too much data into a component of a record subject to a representation clause, when the source of the assignment is a call to a function that returns a discriminated record type with default discriminants, variable size and a statically known upper bound for this size, and the size of the component given by the representation clause is lower than the value of this bound rounded up to the alignment. gcc/ada/ChangeLog: * gcc-interface/trans.c (Call_to_gnu): Also create a temporary for the return value if the LHS is a bit-field and the return type is a type padding a self-referential type. (gnat_to_gnu): Do not remove the padding on the result if it is too small with regard to the natural padding size.
Diffstat (limited to 'gcc/tree-ssa-loop-unswitch.c')
0 files changed, 0 insertions, 0 deletions