aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/gigi.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-30 13:50:34 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-08-30 13:50:34 +0000
commit815b53683243f09194a9a0af270cde060c2d58e7 (patch)
tree9e19d5a983504c5d22e0775588ca9c14f226c37c /gcc/ada/gcc-interface/gigi.h
parent3eefaaa9fe42837b1debc49575b4a5405bf0af3b (diff)
downloadgcc-815b53683243f09194a9a0af270cde060c2d58e7.zip
gcc-815b53683243f09194a9a0af270cde060c2d58e7.tar.gz
gcc-815b53683243f09194a9a0af270cde060c2d58e7.tar.bz2
gigi.h (gigi_checking_assert): New macro.
* gcc-interface/gigi.h (gigi_checking_assert): New macro. * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>: Remove redundant test and adjust comments. Minor tweaks. * gcc-interface/trans.c (Call_to_gnu): Do not generate range checks, instead assert that the Do_Range_Check flag is not set. Adjust call to convert_with_check. (gnat_to_gnu): Likewise. (assoc_to_constructor): Likewise. (pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter. (emit_range_check): Delete. (convert_with_check): Remove RANGE_P parameter and adjust. Do a single overflow check for modular types. From-SVN: r275174
Diffstat (limited to 'gcc/ada/gcc-interface/gigi.h')
-rw-r--r--gcc/ada/gcc-interface/gigi.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h
index f7415c7..21af83e 100644
--- a/gcc/ada/gcc-interface/gigi.h
+++ b/gcc/ada/gcc-interface/gigi.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 1992-2018, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2019, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
@@ -1054,6 +1054,12 @@ extern void enumerate_modes (void (*f) (const char *, int, int, int, int, int,
}
#endif
+/* Use gigi_checking_assert to test invariants in code generation mode.
+ It's effective only if the compiler is configured with more checking
+ than the release mode and can be disabled by means of -fchecking. */
+#define gigi_checking_assert(EXPR) \
+ gcc_checking_assert ((EXPR) || type_annotate_only)
+
/* If EXP's type is a VECTOR_TYPE, return EXP converted to the associated
TYPE_REPRESENTATIVE_ARRAY. */