When compiling attached code, I get the following bug box: +===========================GNAT BUG DETECTED==============================+ | 4.8.1 (x86_64-apple-darwin12) Constraint_Error erroneous memory access | | Error detected at gl-objects-textures-with_1d_loader.ads:31:4 [gl-objects-textures-targets.ads:28:4]| | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==========================================================================+ Attached file consists of multiple source files, to compile it, you have to do gnatchop packed.adb gcc -c gl_test-framebuffers.adb This will produce the bug box. Unfortunately, I don't have a more recent of GNAT to do more testing. I do have GNAT GPL 2013 from AdaCore available, which includes GCC 4.7.4 and also runs into this bug. I tried to reproduce the bug with less code, but wasn't successful. I did notice that removing the type Fillable_Target from the file gl-objects-textures-with_1d_loader.ads fixes the problem. My GCC was compiled with: Target: x86_64-apple-darwin12 Configured with: ../gcc-4.8.1/configure \ --prefix=/opt/gcc-4.8.1 \ --disable-multilib \ --enable-languages=c,c++,ada,fortran,objc,obj-c++ \ --target=x86_64-apple-darwin12 \ --build=x86_64-apple-darwin12 Thread model: posix
Created attachment 31089 [details] Concatenated sources to reproduce (unpack with gnatchop)
$ gnatmake gl_test-framebuffers.adb gcc -c gl_test-framebuffers.adb +===========================GNAT BUG DETECTED==============================+ | 4.9.0 20130916 (experimental) (x86_64-unknown-linux-gnu) Assert_Failure einfo.adb:953| | Error detected at gl-objects-textures-with_1d_loader.ads:31:4 [gl-objects-textures-targets.ads:28:4]| | Please submit a bug report; see http://gcc.gnu.org/bugs.html. | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact gcc or gnatmake command that you entered. | | Also include sources listed below in gnatchop format | | (concatenated together with no headers between files). | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). gl_test-framebuffers.adb gl.ads gl-buffers.ads gl-low_level.ads gl-types.ads gl-algebra.ads gl-vectors.ads gl-matrices.ads gl-types-colors.ads gl-immediate.ads gl-fixed.ads gl-fixed-matrix.ads gl-enums.ads gl-toggles.ads gl-fixed-textures.ads gl-objects.ads gl-objects-textures.ads gl-low_level-enums.ads gl-pixel_data.ads gl-enums-textures.ads gl-objects-textures-targets.ads gl-objects-textures-with_1d_loader.ads gl-objects-textures-with_2d_loader.ads gl-objects-textures-with_3d_loader.ads gl-objects-renderbuffers.ads gl-objects-framebuffers.ads gl-window.ads gl_test.ads gl_test-display_backend.ads compilation abandoned gnatmake: "gl_test-framebuffers.adb" compilation error
Created attachment 31091 [details] Simplified code to reproduce the crash (extract with gnatchop) I managed to create a minimal code example to reproduce the bug. The bug only occurs when: * Bug.Tagged_Type has a determinant. * Bug.Generic_Package.Derived2 is present. * Bug.Instances instantiates Bug.Generic_Package.
Oh sorry, forgot to mention: Simplified code can be compiled with: gnatchop simplified.adb gnatmake bug-proc.adb
Still fails on mainline.