This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/86916] 8.1.0 (x86_64-apple-darwin15) Constraint_Error erroneous memory access
- From: "rogermc at iinet dot net.au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 13 Aug 2018 02:58:50 +0000
- Subject: [Bug ada/86916] 8.1.0 (x86_64-apple-darwin15) Constraint_Error erroneous memory access
- Auto-submitted: auto-generated
- References: <bug-86916-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86916
--- Comment #4 from Roger Mc Murtrie <rogermc at iinet dot net.au> ---
Simon Wright has determined the problem and notes that GNAT has
failed to recognise the actual problem.
(https://groups.google.com/forum/#!topic/comp.lang.ada/MdywAlMPQms)
The problem is in the packages Morph.Mesh_Morph_Value_Pointers,
Mesh_Morph_Weight_Pointers.
You say
package Mesh_Morph_Value_Pointers is new Interfaces.C.Pointers
(Interfaces.C.unsigned, API_Morph_Value, API_Morph_Values_Array,
API_Morph_Value'(others => <>));
but
type API_Morph_Value is new Interfaces.C.unsigned;
so others => <> isn't a legal expression for an API_Morph_Value; you
should say
API_Morph_Value'(0));
There is still a bug, which ought to be fixed, but it's that GNAT has
failed to recognise the actual problem and has got fatally confused.