aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 11:51:09 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 11:51:09 +0200
commit170b298986d2a6f9b9069a43db89b273640ffd31 (patch)
tree7fe583828bc244e1722fc6eebfbbdbe98b2352ac /gcc/ada/exp_ch4.adb
parente917aec294d1a0e602aaf31a70df3a784f7a48b9 (diff)
downloadgcc-170b298986d2a6f9b9069a43db89b273640ffd31.zip
gcc-170b298986d2a6f9b9069a43db89b273640ffd31.tar.gz
gcc-170b298986d2a6f9b9069a43db89b273640ffd31.tar.bz2
[multiple changes]
2011-08-03 Robert Dewar <dewar@adacore.com> * exp_ch4.adb: Minor code cleanup. 2011-08-03 Thomas Quinot <quinot@adacore.com> * exp_dist.adb: Do not generate distribution stubs if serious errors have been diagnosed. 2011-08-03 Ed Schonberg <schonberg@adacore.com> * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of the first formal of a primitive operation, go to the base type to handle properly an access to a derived type with constrained discriminants. * sem_type.adb (Disambiguate): an immediately visible operator hides a user-defined function that is only use-visible. * inline.adb: init procs are inlineable. From-SVN: r177253
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 27e6279..1487f77 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -7764,9 +7764,8 @@ package body Exp_Ch4 is
if Disc = Entity (Selector_Name (N))
and then (Is_Entity_Name (Dval)
- or else Nkind (Dval) = N_Integer_Literal
- or else Is_Subtype_Declaration
- or else Is_Static_Expression (Dval))
+ or else Compile_Time_Known_Value (Dval)
+ or else Is_Subtype_Declaration)
then
-- Here we have the matching discriminant. Check for
-- the case of a discriminant of a component that is