aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2025-11-02 19:36:16 +0100
committerEric Botcazou <ebotcazou@adacore.com>2025-11-02 19:36:16 +0100
commit12f3c63de3b4e53b63347c4bee6a82ce66d0078a (patch)
tree0abe8af32dd3aa55a04c344635eca62bb2e38e4a /contrib/gcc-changelog/git_commit.py
parent21742b80f95af8b884cc45d4f0752578a5462345 (diff)
downloadgcc-12f3c63de3b4e53b63347c4bee6a82ce66d0078a.zip
gcc-12f3c63de3b4e53b63347c4bee6a82ce66d0078a.tar.gz
gcc-12f3c63de3b4e53b63347c4bee6a82ce66d0078a.tar.bz2
Ada: Fix crash on tagged private type with unknown discriminants
This is an old issue with the extension of a tagged private type declared with unknown discriminants in the public part of a generic child unit, although the generic context is not a key factor (i.e. this also happens for a nongeneric child unit). The public part of a child unit does not have visibility on the private part of its parent, so the extension also has unknown discriminants. gcc/ada/ PR ada/58881 * sem_ch3.adb (Build_Derived_Private_Type): Build the underlying full view when the derivation occurs in the public part of the scope of the parent. (Build_Derived_Record_Type): Propagate Has_Unknown_Discriminants in the same circumstances. (Constrain_Discriminated_Type): Give a specific error message for any type with the Has_Unknown_Discriminants flag. gcc/testsuite/ * gnat.dg/specs/unknown_discr1.ads: New test. * gnat.dg/specs/unknown_discr1_pkg.ads: New helper. * gnat.dg/specs/unknown_discr1_pkg-child.ads: Likewise. * gnat.dg/specs/unknown_discr1_pkg-g.ads: Likewise. * gnat.dg/specs/unknown_discr1_pkg-inst.ads: Likewise.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions