[Bug ada/95664] generic instantiation fails to detect abstract equality, builds with gcc-9 and fails to link with gcc-10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95664 Ludovic Brenta changed: What|Removed |Added CC||ludo...@ludovic-brenta.org --- Comment #1 from Ludovic Brenta --- ARM 3.9.3(3/2): A subprogram declared by an abstract_subprogram_declaration or a formal_abstract_subprogram_declaration is an abstract subprogram. If it is a primitive subprogram of a tagged type, then the tagged type shall be abstract. so this does not explicitly forbid abstract subprograms that are primitive to an untagged type; however: 7 A call on an abstract subprogram shall be a dispatching call; nondispatching calls to an abstract subprogram are not allowed. this implicitly requires the formal type of the controlling operand to be tagged and the actual to be class-wide. Therefore I think gcc-9.3 and gcc-10.1 should both report an error; it should be illegal to declare "=" as an abstract primitive subprogram of the untagged type Element.
[Bug ada/40986] [4.6 regression] Assert_Failure sinfo.adb:360, error detected at a-unccon.ads:23:27
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40986 Ludovic Brenta changed: What|Removed |Added Status|WAITING |RESOLVED Known to work||4.7.2 Resolution||FIXED --- Comment #12 from Ludovic Brenta 2013-04-12 17:17:53 UTC --- Not reproducible anymore with gnat-4.7: $ gcc-4.7 -v Using built-in specs. COLLECT_GCC=gcc-4.7 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.7.2 (Debian 4.7.2-5) $ gcc-4.7 -c -I./ -gnato -gnatwl -gnatwauJF -gnatef -g -fno-strict-aliasing -gnatwA -I- ./test.adb $
[Bug ada/40986] [4.6 regression] Assert_Failure sinfo.adb:360, error detected at a-unccon.ads:23:27
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40986 Ludovic Brenta changed: What|Removed |Added Status|RESOLVED|REOPENED Known to work|4.7.2 | Resolution|FIXED | Known to fail||4.7.2 --- Comment #16 from Ludovic Brenta 2013-04-17 18:30:40 UTC --- gcc-4.7 -c -I./ -gnato -gnatwl -gnatwauJF -gnatef -g -fno-strict-aliasing -gnatwA -I- ./test.adb +===GNAT BUG DETECTED==+ | 4.7.2 (x86_64-linux-gnu) Assert_Failure sinfo.adb:388| | Error detected at a-unccon.ads:23:27 | Thanks Markus for noticing the interference of gnatchop. I did the mistake of gnatchopping the reproducer, this hid the problem.
[Bug ada/47748] New: Legal program rejected, ARM 12.7(3/2): instantiating a generic package with "others => <>"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47748 Summary: Legal program rejected, ARM 12.7(3/2): instantiating a generic package with "others => <>" Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: ludo...@ludovic-brenta.org This bug was first reported on comp.lang.ada and confirmed: package formalpkg is generic type T is private; with procedure P (X : T) is <>; package F is end F; generic with package FA is new F (others => <>); -- line 17 package B is end B; procedure P1 (X : Character) is null; package F1 is new F (Character, P1); -- use P => P1 package B1 is new B (F1); -- Error !! procedure P (X : Character) is null; package F2 is new F (Character); -- P => P package B2 is new B (F2); -- OK end formalpkg; % gnatmake formalpkg.ads gcc -c formalpkg.ads formalpkg.ads:17:25: actual for "P" in actual instance does not match formal gnatmake: "formalpkg.ads" compilation error On line 17, replacing "others => <>" with just "<>" makes the package compile cleanly.
[Bug ada/37110] Assert_Failure at atree.adb:886 caused by legal prefixed notation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37110 Ludovic Brenta changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|WONTFIX | --- Comment #6 from Ludovic Brenta 2011-09-05 19:55:48 UTC --- Reopening this bug now that Nicolas found a reproducer.
[Bug ada/69476] New: Fail to reconize types with an unrejected static size attribute as compile time known size type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69476 Bug ID: 69476 Summary: Fail to reconize types with an unrejected static size attribute as compile time known size type Product: gcc Version: 4.9.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: ludo...@ludovic-brenta.org Target Milestone: --- Forwarding Debian bug http://bugs.debian.org/812587 Please see below a minimal test case striped down form a real case : procedure Foo is type Unbiased_T is range 0 .. 4 with Size => 3; pragma Warnings (Off, "size clause forces biased representation for ""Biased_T"""); type Biased_T is range 1 .. 4 with Size => 2; pragma Warnings (On, "size clause forces biased representation for ""Biased_T"""); type Biased_Or_Unbiased_T (Biased : Boolean) is record case Biased is when True => Biased_Value : Biased_T; when False => Unbiased_Value : Unbiased_T; end case; end record with Unchecked_Union, Convention => Ada, Size => 3; for Biased_Or_Unbiased_T use record Biased_Value at 0 range 1 .. 2; Unbiased_Value at 0 range 0 .. 2; end record; type Hardware_Register_T (Value_1_Is_Biased : Boolean; Value_2_Is_Biased : Boolean) is record Value_1 : Biased_Or_Unbiased_T (Value_2_Is_Biased); Value_2 : Biased_Or_Unbiased_T (Value_2_Is_Biased); end record with Size => 8, Volatile; for Hardware_Register_T use record Value_1 at 0 range 0 .. 2; Value_2 at 0 range 3 .. 5; Value_1_Is_Biased at 0 range 6 .. 6; Value_2_Is_Biased at 0 range 7 .. 7; end record; begin null; end Foo; When invoking gnatmake as this : gnatmake foo.adb I get this output : gcc-4.9 -c foo.adb foo.adb:38:11: size clause not allowed for variable length type foo.adb:42:28: component clause not allowed for variable length component foo.adb:43:28: component clause not allowed for variable length component gnatmake: "foo.adb" compilation error But none of the types here are variable length. By some little investigation I have found that all of the 3 reported errors cames from the same place in the compiler code. The function Size_Known_At_Compile_Time return False and should return True in the file freeze.adb at line 2832 and line 5228. I expected at least any type with a static unrejected size attribute or clause to be considered having a Size_Known_At_Compile_Time. The function Size_Known_At_Compile_Time itself defined in einfo.adb line 2892 just return a flag which seem to only be manipulated by the procedure Set_Size_Known_At_Compile_Time also define in einfo.adb at line 5655. I suspect a call to the procedure Set_Size_Known_At_Compile_Time should be added somwhere in freese.adb when there is a size clause or attribute for a type but there I am at my limit in my understanding of the compiler code. I suspect this bug to be present in all architecture and I can at least confirme it on gnat-4.9 for x86 and powerpc, gnat-4.6 on x86 and avr-ada gnat-4.7. In the hope this bug report will help. Henri GEIST
[Bug ada/32164] [4.3/4.6/4.7 Regression] ICE when renaming predefined "=" and "/="
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32164 --- Comment #10 from Ludovic Brenta 2011-05-10 08:48:53 UTC --- (In reply to comment #9) > This works with 4.4.x and 4.5.x: > > pak1.ads:2:09: prefix of "Unrestricted_Access" attribute cannot be intrinsic I wouldn't qualify this as "working". The test program does not use Unrestricted_Access and I think it is legal, so GCC should not reject it. I think this is in fact another bug which hides PR32164.
[Bug ada/49212] New: targparm.ad[bs]: Runtime Library Exception in spec but not corresponding body
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49212 Summary: targparm.ad[bs]: Runtime Library Exception in spec but not corresponding body Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: ludo...@ludovic-brenta.org In gcc/gcc/ada, I just noticed that targparm.ads has the Runtime Library Exception but targparm.adb does not. This has been the case since: 2005-12-05 Doug Rupp * targparm.ads: Add special exception to license. Is this intentional? If not, I suggest removing the Runtime Library Exception from the spec, since this unit is not part of the run-time library libgnat. -- Ludovic Brenta.
[Bug ada/49783] GCC must bring ads and adb files after installation
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49783 Ludovic Brenta changed: What|Removed |Added CC||ludo...@ludovic-brenta.org --- Comment #1 from Ludovic Brenta 2011-07-20 17:30:55 UTC --- I have resolved this problem in Debian by creating two additional libraries from the GCC sources: libgnatvsn (GNAT Version Library under GPL3 with Runtime Library Exception) and libgnatprj (Project File parser under pure GPL). For full details, see: * Debian Ada Policy http://people.debian.org/~lbrenta/debian-ada-policy.html * my presentation at FOSDEM 2011 http://www.youtube.com/watch?v=-3HvUH4fJPM * the stack of Debian patches that implement the idea: ada-link-lib.diff, ada-libgnatvsn.diff, ada-libgnatprj.diff in this order. I am willing to submit these patches upstream to GCC; however they do introduce a potential problem: they make libgnat necessary on the host as well as on the target. Indeed, with these patches, all GNAT tools (gnatmake and friends) are now linked dynamically against libgnat-$V.so and the two new libraries libgnatvsn.so.$V and libgnatprj.so.$V (for V in 4.1 .. 4.6).
[Bug ada/49819] New: gcc/ada/gcc-interface/Makefile.in refers to g-trasym-dwarf.adb which does not exist
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49819 Summary: gcc/ada/gcc-interface/Makefile.in refers to g-trasym-dwarf.adb which does not exist Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: ludo...@ludovic-brenta.org Target: powerpc-linux-gnu This patch, committed in Subversion as revision 165921: 2010-10-25 Jose Ruiz * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for powerpc-linux): Reorganize target pairs so that it works on linux and ElinOS. included this change: --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1790,31 +1790,15 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),) s-intman.adbhttp://bugs.debian.org/635112]
[Bug ada/49940] New: [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:717:32: "lwp_self" is undefined"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49940 Summary: [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:717:32: "lwp_self" is undefined" Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: ludo...@ludovic-brenta.org Host: x86_64-pc-kfreebsd-gnu Target: x86_64-pc-kfreebsd-gnu Build: x86_64-pc-kfreebsd-gnu (Forwarding http://bugs.debian.org/636291) In the build logs at https://buildd.debian.org/status/fetch.php?pkg=gnat-4.6&arch=kfreebsd-amd64&ver=4.6.1-2&stamp=1311435165 we see: /build/buildd-gnat-4.6_4.6.1-2-kfreebsd-amd64-Jts3n3/gnat-4.6-4.6.1/build/./gcc/xgcc -B/build/buildd-gnat-4.6_4.6.1-2-kfreebsd-amd64-Jts3n3/gnat-4.6-4.6.1/build/./gcc/ -c -g -O2 -W -Wall -gnatpg s-taprop.adb -o s-taprop.o s-taprop.adb:717:32: "lwp_self" is undefined s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow) I have traced the first error to the following commit: 2009-04-15 Nicolas Roche * adaint.c: Add function __gnat_lwp_self that retrieves the LWP of the current thread. * s-osinte-linux.ads: Import the __gnat_lwp_self function as lwp_self * s-taprop-linux.adb (Enter_Task): Store the LWP in the TCB git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146097 138bc75d-0d04-0410-961f-82ee72b054a4 The function __gnat_lwp_self exists in adaint.c only #if defined(linux), so it may not apply to kfreebsd-*. The problem exists because kfreebsd-* uses s-osinte-kfreebsd-gnu.ads, which does not import the function, but also uses s-taprop-linux.adb, which does use the function. (Note that s-taprop-posix.adb also calls lwp_self). I am not sure what to do: * introduce a new file s-taprop-kfreebsd-gnu.adb? * provide the function __gnat_lwp_self also on kfreebsd-* and import it in s-osinte-kfreebsd-gnu.ads? -- Ludovic Brenta.
[Bug ada/49944] New: [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49944 Summary: [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)" Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: ludo...@ludovic-brenta.org Host: x86_64-pc-kfreebsd-gnu Target: x86_64-pc-kfreebsd-gnu Build: x86_64-pc-kfreebsd-gnu The following commit changed s-osinte-linux.ads but not s-osinte-kfreebsd-gnu.ads; this breaks bootstrapping on GNU/kFreeBSD: * adaint.c (__gnat_pthread_setaffinity_np, __gnat_pthread_attr_setaffinity_np): Remove wrappers, no longer needed. * s-osinte-linux.ads (pthread_setaffinity_np, pthread_attr_setaffinity_np): Remove use of wrappers. * s-taprop-linux.adb (Create_Task, Initialize): Restore check to verify whether the affinity functionality is available in the OS. * gcc-interface/utils.c: Set TREE_STATIC on functions only when there are defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165635 138bc75d-0d04-0410-961f-82ee72b054a4 This is because GNU/kFreeBSD uses s-taprop-linux.adb, which uses subprograms defined in either s-osint-linux.ads or s-osint-kfreebsd-gnu.ads depending on the host.
[Bug ada/49944] [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49944 --- Comment #3 from Ludovic Brenta 2011-08-02 17:30:43 UTC --- I would not be so assertive as Arno. It seems to me (but I may be wrong) that s-taprop-linux.adb really only calls glibc and libpthread, not the kernel, and therefore should be called s-taprop-glibc.adb. It looks like the kernel-specific calls are all in s-osinte-{linux,freebsd,kfreebsd-gnu}.ads, which have the proper names. GNU/kFreeBSD uses the GNU glibc instead of FreeBSD's libc, so I think s-taprop-linux.adb is appropriate there.
[Bug ada/49940] [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:717:32: "lwp_self" is undefined"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49940 --- Comment #2 from Ludovic Brenta 2011-08-02 17:39:02 UTC --- I found that declaring lwp_self in s-osinte-kfreebsd-gnu.ads similarly to the declaration in s-osinte-freebsd.ads fixed the problem. Patch submitted as http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00139.html.
[Bug ada/49944] [4.5/4.6/4.7 regression] Bootstrapping on x86_64-pc-kfreebsd-gnu fails with "s-taprop.adb:856:10: "pthread_attr_setaffinity_np" is undefined (more references follow)"
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49944 --- Comment #5 from Ludovic Brenta 2011-08-04 10:21:20 UTC --- OK, here is another patch which changes GCC to use s-taprop-posix.ad[bs] on GNU/kFreeBSD. The changes in s-osinte-kfreebsd-gnu.ads are more extensive than in the previous patch I sent to gcc-patches; they greatly reduce the difference between s-osinte-kfreebsd-gnu.ads and s-osinte-freebsd.ads. http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00440.html
[Bug ada/50048] New: "cc1: note: obsolete option -I- used, please use -iquote instead" during bootstrap
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50048 Bug #: 50048 Summary: "cc1: note: obsolete option -I- used, please use -iquote instead" during bootstrap Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: ada AssignedTo: unassig...@gcc.gnu.org ReportedBy: ludo...@ludovic-brenta.org Host: i386-linux-gnu Target: i386-linux-gnu Build: i386-linux-gnu During bootstrapping with ada enabled, I get this message multiple times: cc1: note: obsolete option -I- used, please use -iquote instead because of line 250 in gcc/ada/gcc-interface/Makefile.in. Recent changes in the glibc header files have caused GCC to fail to bootstrap on i386; see http://bugs.debian.org/637418. Replacing -I- with -iquote as suggested fixes this.