This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/86916] 8.1.0 (x86_64-apple-darwin15) Constraint_Error erroneous memory access


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]