]> git.ipfire.org Git - thirdparty/gcc.git/commit
Ada: Fix assertion failure on allocators for discriminated type with default
authorFranck Behaghel <franckbehaghel_gcc@protonmail.com>
Sun, 5 Oct 2025 10:17:10 +0000 (12:17 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Sun, 5 Oct 2025 10:20:58 +0000 (12:20 +0200)
commit6fdee070ff386bb5c284234afa3dfda9ba3d22db
tree59ea221b8f5733f468d9e181437f40eba7bef365
parent865791ae8b1ed7f22a54adb0f9940ede3375c81f
Ada: Fix assertion failure on allocators for discriminated type with default

This is an incorrect node sharing for allocators built for a discriminated
type with default values.

gcc/ada/
PR ada/110314
* sem_ch4.adb (Analyze_Allocator): Add call to New_Copy_Tree.

gcc/testsuite/
* gnat.dg/allocator3.adb: New test.
gcc/ada/sem_ch4.adb
gcc/testsuite/gnat.dg/allocator3.adb [new file with mode: 0644]