This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/35493] Assert_Failure uintp.adb:1593
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Mar 2008 12:05:38 -0000
- Subject: [Bug ada/35493] Assert_Failure uintp.adb:1593
- References: <bug-35493-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-03-07 12:05 -------
I think the Ada front-end has TREE_CONSTANT and TREE_READONLY definition
swapped around:
/* Whether we will make TREE_CONSTANT the DECL we produce here, in which
case the initializer may be used in-lieu of the DECL node (as done in
Identifier_to_gnu). This is useful to prevent the need of elaboration
code when an identifier for which such a decl is made is in turn used as
an initializer. We used to rely on CONST vs VAR_DECL for this purpose,
but extra constraints apply to this choice (see below) and are not
relevant to the distinction we wish to make. */
bool constant_p = const_flag && init_const;
TREE_READONLY (var_decl) = const_flag;
DECL_EXTERNAL (var_decl) = extern_flag;
TREE_PUBLIC (var_decl) = public_flag || extern_flag;
TREE_CONSTANT (var_decl) = constant_p;
READ_ONLY means it is only read and not written to at all and the initializer
is valid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35493