diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-06-24 09:30:10 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-10-15 05:39:11 -0400 |
commit | 2b47f13daba17a6e77e74a94ac0daeadbd30a482 (patch) | |
tree | 460e261c6e2351bd69f40c4f17a49c167248c040 /gcc/ada | |
parent | e1e129684cb791c6fe508737a959c84b5f6dfbfa (diff) | |
download | gcc-2b47f13daba17a6e77e74a94ac0daeadbd30a482.zip gcc-2b47f13daba17a6e77e74a94ac0daeadbd30a482.tar.gz gcc-2b47f13daba17a6e77e74a94ac0daeadbd30a482.tar.bz2 |
[Ada] Adjust style in support for CUDA_Execute pragma
gcc/ada/
* sem_prag.adb (Is_Acceptable_Dim3): Use Is_RTE to not pull CUDA
package unless necessary; rename local Tmp variable; iterate
with procedural Next.
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/sem_prag.adb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index b7148d80..b765c9f 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -14774,16 +14774,17 @@ package body Sem_Prag is function Is_Acceptable_Dim3 (N : Node_Id) return Boolean; -- Returns True if N is an acceptable argument for CUDA_Execute, - -- false otherwise. + -- False otherwise. ------------------------ -- Is_Acceptable_Dim3 -- ------------------------ function Is_Acceptable_Dim3 (N : Node_Id) return Boolean is - Tmp : Node_Id; + Expr : Node_Id; begin - if Etype (N) = RTE (RE_Dim3) or else Is_Integer_Type (Etype (N)) + if Is_RTE (Etype (N), RE_Dim3) + or else Is_Integer_Type (Etype (N)) then return True; end if; @@ -14791,10 +14792,10 @@ package body Sem_Prag is if Nkind (N) = N_Aggregate and then List_Length (Expressions (N)) = 3 then - Tmp := First (Expressions (N)); - while Present (Tmp) loop - Analyze_And_Resolve (Tmp, Any_Integer); - Tmp := Next (Tmp); + Expr := First (Expressions (N)); + while Present (Expr) loop + Analyze_And_Resolve (Expr, Any_Integer); + Next (Expr); end loop; return True; end if; @@ -14813,7 +14814,6 @@ package body Sem_Prag is -- Start of processing for CUDA_Execute begin - GNAT_Pragma; Check_At_Least_N_Arguments (3); Check_At_Most_N_Arguments (5); |