aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-12-11 07:45:54 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2022-01-07 16:24:06 +0000
commitb2f150304dc18af2f6b11005a140339f170d6fc2 (patch)
treeff765cc67e4d4b4f1e3eaaaf3c387a1385f23a55 /gcc/ada
parenta3c3de386bfce7910745386f727fe6b5f83d2906 (diff)
downloadgcc-b2f150304dc18af2f6b11005a140339f170d6fc2.zip
gcc-b2f150304dc18af2f6b11005a140339f170d6fc2.tar.gz
gcc-b2f150304dc18af2f6b11005a140339f170d6fc2.tar.bz2
[Ada] treepr: print value only for discrete types
gcc/ada/ * treepr.adb (Print_Node_Ref): Change "not Is_Array_Type" to "Is_Discrete_Type".
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/treepr.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
index ad2bbf0..4980713 100644
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -1643,13 +1643,13 @@ package body Treepr is
end if;
end if;
- -- If this is an integer-like expression whose value is known, print
- -- that value.
+ -- If this is a discrete expression whose value is known, print that
+ -- value.
if Nkind (N) in N_Subexpr
and then Compile_Time_Known_Value (N)
and then Present (Etype (N))
- and then not Is_Array_Type (Etype (N))
+ and then Is_Discrete_Type (Etype (N))
then
if Is_Entity_Name (N) -- e.g. enumeration literal
or else Nkind (N) in N_Integer_Literal