itypes.ads
8.33 KB
-
[Ada] Spurious "Duplicated symbol" error with discriminated tasks · 2e5df295
This patch fixes a spurious error in a program that contains a discriminated task type and several of its subtype in the same declarative part, when the corresponding discriminant constraints are expressions. 2018-08-21 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_util.ads, sem_util.adb (New_External_Entity): Type of Suffix_Index must be Int, not Nat, so that a negative value can be used to generate a unique name for an external object, as specified in Tbuild.New_External_Name. (Scope_Within): Handle private type whose completion is a synchronized type (For unnesting). * itypes.ads, itypes.adb (Create_Itype): Ditto * sem_ch3.adb (Constrain_Corresponding_Record): Generate a unique name for the created subtype, because there may be several discriminated tasks present in the same scope, and each needs its distinct corresponding record subtype. gcc/testsuite/ * gnat.dg/task1.adb, gnat.dg/task1.ads, gnat.dg/task1_pkg.adb, gnat.dg/task1_pkg.ads: New testcase. From-SVN: r263716
Ed Schonberg committed