public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/24079] New: Bug box: Assert_Failure atree.adb:812
@ 2005-09-27  9:01 kat-zygfryd at o2 dot pl
  2005-09-27 18:44 ` [Bug ada/24079] Ada FE ICE on protected procedure with default argument (invalid?) laurent at guerby dot net
  0 siblings, 1 reply; 2+ messages in thread
From: kat-zygfryd at o2 dot pl @ 2005-09-27  9:01 UTC (permalink / raw)
  To: gcc-bugs

This bug is triggered by assigning a private variable of a protected object as
the default expression of its private protected procedure's parameter.

-----------------------------------------------------------------------------

$ gnatgcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gnat-4.01/work/gcc-4.0.1/configure
--prefix=/usr --program-prefix=gnat --enable-languages=c,ada --enable-libada
--with-gcc --with-gnu-ld --with-gnu-as --enable-threads=posix --enable-shared
--with-system-zlib --disable-nls --libdir=/usr/lib/ada
--libexecdir=/usr/libexec/ada --mandir=/usr/share/man --infodir=/usr/share/info
Thread model: posix
gcc version 4.0.1

-----------------------------------------------------------------------------

$ gnatmake bug
gnatgcc -c bug.adb
+===========================GNAT BUG DETECTED==============================+
| 4.0.1 (i686-pc-linux-gnu) Assert_Failure atree.adb:812                   |
| Error detected at bug.adb:15:50                                          |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| 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.

bug.adb

compilation abandoned
gnatmake: "bug.adb" compilation error

-----------------------------------------------------------------------------

-------- begin file: bug.adb --------
procedure Bug is

   protected Object is

      entry Trigger;

   private

      Private_Variable : Integer;

   end Object;

   protected body Object is

      procedure Bug_Happens_Here (I : Integer := Private_Variable) is
      begin
         null;
      end Bug_Happens_Here;

      entry Trigger
         when True is
      begin
         Bug_Happens_Here;
      end Trigger;

   end Object;

begin
   null;
end Bug;
-------- end file: bug.adb --------

-- 
           Summary: Bug box: Assert_Failure atree.adb:812
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kat-zygfryd at o2 dot pl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24079


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug ada/24079] Ada FE ICE on protected procedure with default argument (invalid?)
  2005-09-27  9:01 [Bug ada/24079] New: Bug box: Assert_Failure atree.adb:812 kat-zygfryd at o2 dot pl
@ 2005-09-27 18:44 ` laurent at guerby dot net
  0 siblings, 0 replies; 2+ messages in thread
From: laurent at guerby dot net @ 2005-09-27 18:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From laurent at guerby dot net  2005-09-27 18:24 -------
ICE on all versions including HEAD. I would say this is not legal Ada since RM
6.4.1(5) allows a default_expression to be a variable name but here you put a
protected object component name, so for now I set this PR as ice-on-invalid.
On the other hand, I'm not sure this would pose implementation issues (just copy
after taking the lock) or semantic constraints (once lock taken value can't
change) to allow this construct (may be AI?).

| 3.3.5 20050117 (prerelease) (SUSE Linux) (i586-suse-linux-gnu)           |
| Assert_Failure atree.adb:677                                             |
| Error detected at bug.adb:15:50                                          |

| 3.4.4 (i686-pc-linux-gnu) Assert_Failure atree.adb:703                   |
| Error detected at bug.adb:15:50                                          |

| 4.0.1 (i686-pc-linux-gnu) Assert_Failure atree.adb:812                   |
| Error detected at bug.adb:15:50                                          |

| 4.1.0 20050925 (experimental) (i686-pc-linux-gnu) Assert_Failure atree.adb:812|
| Error detected at bug.adb:15:50                                          |


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-09-27 18:24:22
               date|                            |
            Summary|Bug box: Assert_Failure     |Ada FE ICE on protected
                   |atree.adb:812               |procedure with default
                   |                            |argument (invalid?)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24079


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-27 18:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-27  9:01 [Bug ada/24079] New: Bug box: Assert_Failure atree.adb:812 kat-zygfryd at o2 dot pl
2005-09-27 18:44 ` [Bug ada/24079] Ada FE ICE on protected procedure with default argument (invalid?) laurent at guerby dot net

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).