public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bauhaus at futureapps dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ada/50600] New: "Illegal instruction" when using pragma Profile (Restricted) Date: Mon, 03 Oct 2011 15:34:00 -0000 [thread overview] Message-ID: <bug-50600-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50600 Bug #: 50600 Summary: "Illegal instruction" when using pragma Profile (Restricted) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned@gcc.gnu.org ReportedBy: bauhaus@futureapps.de The program below will fail as indicated (or not run correctly, depending on platform) when pragma profile (Restricted) is in effect. Failures vary a little. On Mac OS X 10.6.8, GCC 4.7.0 x86_64-apple-darwin10.8.0 from 20111002: $ ./rstr rsrt Illegal instruction $ A seemingly hanging program (Debian 6, GCC 4.7.0 i686-pc-linux-gnu from 20110610). Stack traces in the debugger have varied a bit (on Mac), but mostly list subprograms to do with PO entry calls (waiting) and (pthread) mutex locking, judging by the names. Program receives SIGSEGV in debugger. $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/opt/GCC-4.7/libexec/gcc/x86_64-apple-darwin10.8.0/4.7.0/lto-wrapper Target: x86_64-apple-darwin10.8.0 Configured with: /Users/bauhaus/src/GCC/configure --enable-languages=c,ada --disable-nls --prefix=/opt/GCC-4.7 Thread model: posix gcc version 4.7.0 20111002 (experimental) (GCC) If the program text is in file "rstr.ada", then $ gnatchop -r -w rstr.ada && gnatmake rstr pragma Profile (Restricted); package Tsk is task Nop is pragma Priority (5); end Nop; end Tsk; with Report; package body Tsk is task body Nop is begin Report.Put_Line ("Nop"); end Nop; end Tsk; with Tsk; with Report; procedure Rstr is begin Report.Put_Line ("rsrt"); end Rstr; package Report is procedure Put_Line (Message : String); private protected Output is entry Wait; procedure Release; private Available : Boolean := True; end Output; end Report; with Ada.Text_IO; package body Report is procedure Put_Line (Message : String) is begin Output.Wait; Ada.Text_IO.Put_Line (Message); Ada.Text_IO.Flush; Output.Release; end Put_Line; protected body Output is entry Wait when Available is begin Available := False; end Wait; procedure Release is begin Available := True; end Release; end Output; end Report;
reply other threads:[~2011-10-03 15:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-50600-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).