aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/g-graphs.adb
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-03 08:14:47 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-03 08:14:47 +0000
commit558241c0f71b4171c471100631af79aa93c0a9e7 (patch)
treefebc39487c3b4c48efa51fd799c36db4c0f6b5fd /gcc/ada/libgnat/g-graphs.adb
parentb5c8da6bac845e685236eeedc02f0814c05ed42f (diff)
downloadgcc-558241c0f71b4171c471100631af79aa93c0a9e7.zip
gcc-558241c0f71b4171c471100631af79aa93c0a9e7.tar.gz
gcc-558241c0f71b4171c471100631af79aa93c0a9e7.tar.bz2
[Ada] Spurious error with static predicate in generic unit
This patch fixes a spurious error in a generic unit that invludes a subtype with a static predicate, when the type is used in a case expression. 2019-07-03 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): In a generic context we do not build the bodies of predicate fuctions, but the expression in a static predicate must be elaborated to allow case coverage checking within the generic unit. (Build_Discrete_Static_Predicate): In a generic context, return without building function body once the Static_Discrete_Predicate expression for the type has been constructed. gcc/testsuite/ * gnat.dg/predicate6.adb, gnat.dg/predicate6.ads: New testcase. * gnat.dg/static_pred1.adb: Remove expected error. From-SVN: r272974
Diffstat (limited to 'gcc/ada/libgnat/g-graphs.adb')
0 files changed, 0 insertions, 0 deletions