public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "demoonlit at panathenaia dot halfmoon.jp" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/48002] New: internal error on calling inherited, overloaded and abstract subprograms with string literal Date: Sun, 06 Mar 2011 12:03:00 -0000 [thread overview] Message-ID: <bug-48002-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48002 Summary: internal error on calling inherited, overloaded and abstract subprograms with string literal Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned@gcc.gnu.org ReportedBy: demoonlit@panathenaia.halfmoon.jp Created attachment 23560 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23560 minimal bug triggering source code gcc-4.5.1 and 4.5.2 crash with internal error. 1. declare a type (named A.T) and primitive subprogram (named A.F) having a String parameter. 2. declare new type (named B.T) derived from A.T, this type has inherited subprogram B.F from A.F. 3. re-declare B.F as abstract to hide. 4. overload B.F having a Wide_String parameter. 5. call Wide_String version of B.F with string literal. minimal source: procedure overload_str is package A is type T is new Integer; procedure F (X : T; Y : String) is null; end A; package B is type T is new A.T; procedure F (X : T; Y : Wide_String) is null; procedure F (X : T; Y : String) is abstract; -- hide inherited F end B; begin B.F (B.T'(0), "ABC"); -- compiler may crash B.F (B.T'(0), Wide_String'("ABC")); -- OK end overload_str; % gnatmake overload_str gcc -c overload_str.adb +===========================GNAT BUG DETECTED==============================+ | 4.5.2 (i686-apple-darwin9) Assert_Failure einfo.adb:1698 | | Error detected at overload_str.adb:12:10 | | 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). overload_str.adb compilation abandoned gnatmake: "overload_str.adb" compilation error
next reply other threads:[~2011-03-06 12:03 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-03-06 12:03 demoonlit at panathenaia dot halfmoon.jp [this message] 2014-11-10 12:42 ` [Bug ada/48002] " fxcoudert at gcc dot gnu.org 2014-11-10 14:18 ` charlet at gcc dot gnu.org 2015-04-22 11:57 ` jakub at gcc dot gnu.org 2015-07-16 9:11 ` rguenth at gcc dot gnu.org 2015-07-18 10:29 ` demoonlit at panathenaia dot halfmoon.jp 2015-09-01 23:34 ` demoonlit at panathenaia dot halfmoon.jp
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-48002-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).