public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "aravindvijayan224185 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/51035] New: GNAT bug detected error reported when compiling Ada code Date: Tue, 08 Nov 2011 17:30:00 -0000 [thread overview] Message-ID: <bug-51035-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51035 Bug #: 51035 Summary: GNAT bug detected error reported when compiling Ada code Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned@gcc.gnu.org ReportedBy: aravindvijayan224185@gmail.com Created attachment 25754 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25754 The source code When compiling a test program written in Ada using 4.6.1 20110908 (Red Hat 4.6.1-9) (i686-redhat-linux-gnu) (package gcc-gnat-4.6.1-9.fc15.i686), I see the following error message: ---------------------------------------------------------------------------- [aravind@localhost ada]$ gnatmake test.adb gcc -c test.adb +===========================GNAT BUG DETECTED==============================+ | 4.6.1 20110908 (Red Hat 4.6.1-9) (i686-redhat-linux-gnu) Assert_Failure sinfo.adb:2547| | Error detected at test.adb:5: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). test.adb test.adb:5:39: extra ")" ignored compilation abandoned gnatmake: "test.adb" compilation error ------------------------------------------------------------------- The ada program text consists of the following lines: --begin program with Ada.Text_IO; procedure Test is subtype X is Integer range (1 .. 25); Y: Integer range X'First .. X'Last := X'First; begin Ada.Text_IO.Put("Hello World"); end Test; -- end program The error lies with the line which reads: subtype X is Integer range (1 .. 25); The brackets around the 1 .. 25 are wrong. Once removed, the error goes away. However, the compiler should report a nice error message and not report that a bug in the compiler has been found. ------------------------------------------------------------------ here is the "gcc -v" output: [aravind@localhost ada]$ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.6.1/lto-wrapper Target: i686-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux Thread model: posix gcc version 4.6.1 20110908 (Red Hat 4.6.1-9) (GCC) -------------------------------------------------------------------------- expected behavior: Just a compiler error due to syntax error actual behavior: A bug box even that is only a syntax error ---------------------------------------------------------------------------
next reply other threads:[~2011-11-08 17:21 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-08 17:30 aravindvijayan224185 at gmail dot com [this message] 2012-02-08 6:08 ` [Bug ada/51035] " coopht at gmail dot com 2012-02-08 7:47 ` charlet at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-51035-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).