diff options
| author | Eric Botcazou <ebotcazou@adacore.com> | 2026-01-28 23:31:49 +0100 |
|---|---|---|
| committer | Eric Botcazou <ebotcazou@adacore.com> | 2026-01-28 23:56:27 +0100 |
| commit | ea0f31d040c10e4f9b42f1cf818970bcaf5277a8 (patch) | |
| tree | 344b45a68c3dba3b7cc01027380467b79e8bee2e /libjava/gnu/java/security/ber/BER.java | |
| parent | ddf94524f9accb47c1fc59191739ec34c5907eb8 (diff) | |
| download | gcc-ea0f31d040c10e4f9b42f1cf818970bcaf5277a8.zip gcc-ea0f31d040c10e4f9b42f1cf818970bcaf5277a8.tar.gz gcc-ea0f31d040c10e4f9b42f1cf818970bcaf5277a8.tar.bz2 | |
Ada: Fix stack corruption with concatenation and 'Image of composite type
The issue is that the expansion of 'Image for composite types is heavyweight
and involves a mix of Expression_With_Actions and controlled object that
does not work properly when it is the argument of a call to a subprogram,
so this replaces it by the canonical scheme used for controlled temporaries.
gcc/ada/
PR ada/123832
* exp_imgv.adb: Add with and use clauses for Exp_Ch7.
(Expand_Image_Attribute): Establish a transient scope before
rewriting the attribute as a call to Put_Image.
(Expand_Wide_Image_Attribute): Likewise.
(Expand_Wide_Wide_Image_Attribute): Likewise.
* exp_put_image.ads (Build_Image_Call): Add note about the
need for a transient scope when the function is invoked.
* exp_put_image.adb (Build_Image_Call): Call Insert_Actions
to immediately insert the actions instead of wrapping them
in an Expression_With_Actions node.
gcc/testsuite/
* gnat.dg/put_image2.adb: New test.
Diffstat (limited to 'libjava/gnu/java/security/ber/BER.java')
0 files changed, 0 insertions, 0 deletions
