Bug 11100 - Internal compiler error: Ada florist-3.15p posix-sockets.gpb:481:20
Summary: Internal compiler error: Ada florist-3.15p posix-sockets.gpb:481:20
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.2.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-06-05 11:02 UTC by Santiago Urueña Pascual
Modified: 2003-12-05 20:31 UTC (History)
1 user (show)

See Also:
Host: i586-mandrake-linux-gnu
Target: i586-mandrake-linux-gnu
Build: i586-mandrake-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-08-15 20:38:46


Attachments
Source files of the error report (31.16 KB, application/octet-stream)
2003-06-20 07:20 UTC, Santiago Urueña Pascual
Details
File posix-sockets-internet.ads (2.94 KB, application/octet-stream)
2003-08-01 11:51 UTC, Santiago Urueña Pascual
Details
File 'posix.adb' (4.32 KB, application/octet-stream)
2003-08-13 17:55 UTC, Santiago Urueña Pascual
Details
File 'posix-io.adb' (4.85 KB, application/octet-stream)
2003-08-15 01:00 UTC, Santiago Urueña Pascual
Details
Additional source files of the error report (6.47 KB, application/octet-stream)
2003-08-15 11:31 UTC, Santiago Urueña Pascual
Details
bug-11100-ICE.ada.gz (35.02 KB, application/octet-stream)
2003-11-08 02:15 UTC, gnat-dev
Details
Makefiles.tgz (7.89 KB, application/octet-stream)
2003-11-08 02:15 UTC, gnat-dev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Santiago Urueña Pascual 2003-06-05 11:02:52 UTC
[santi@tatooine ada]$
[santi@tatooine ada]$ make
gnatmake -Ifloristlib posix_test.adb -largs -lflorist
gcc -c -Ifloristlib posix_test.adb
gcc -c -I./ -Ifloristlib -I- floristlib/posix-sockets.adb
+===========================GNAT BUG DETECTED==============================+
| 3.2.2 20030213 (3.2.2-3mdk) (i586-mandrake-linux-gnu) GCC error:         |
| Internal compiler error in convert_move, at expr.c:1250                  |
| Error detected at posix-sockets.gpb:481:20                               |
| 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

floristlib/posix-sockets.adb
floristlib/posix-sockets.ads
floristlib/posix.ads
floristlib/ada_streams.ads
floristlib/posix-c.ads
floristlib/posix-io.ads
floristlib/posix-permissions.ads
floristlib/posix-process_identification.ads
floristlib/posix-limits.ads
floristlib/posix-implementation.ads

compilation abandoned
gnatmake: "floristlib/posix-sockets.adb" compilation error
make: *** [all] Error 4
[santi@tatooine ada]$
[santi@tatooine ada]$
[santi@tatooine ada]$
[santi@tatooine ada]$
[santi@tatooine ada]$
[santi@tatooine ada]$
[santi@tatooine ada]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --enable-long-long
--enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java
--host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
[santi@tatooine ada]$
[santi@tatooine ada]$
Comment 1 Santiago Urueña Pascual 2003-06-05 11:31:01 UTC
--
--  How can I send the rest of the source code? Are only files of the Ada
-- library florist: 
--  ftp://ftp.cs.nyu.edu/pub/gnat/3.15p/florist-3.15p-src.tgz
-- 
--  I will send those files to <gcc-bugs@gcc.gnu.org>, with subjet:
--    Bug 11100 source code
--
--  I hope this is the correct form of send source code.

with  POSIX;
with  POSIX.IO;
with  POSIX.Sockets;
with  POSIX.Sockets.Internet;

with  Ada.Text_IO;
with  Ada.Integer_Text_IO;


procedure Posix_Test is
        Error : POSIX.Error_Code;

        Server_Socket  : POSIX.IO.File_Descriptor;
        Server_Address : POSIX.Sockets.Socket_Address_Pointer;
begin

        Ada.Text_IO.Put_Line(Integer'Image(POSIX.POSIX_Ada_Version));
        Ada.Text_IO.New_Line;

        Server_Socket :=
POSIX.Sockets.Create(POSIX.Sockets.Internet.Internet_Protocol,
                                              POSIX.Sockets.Stream_Socket,
                                              POSIX.Sockets.Internet.TCP);

        POSIX.Sockets.Connect(Server_Socket, Server_Address);

        POSIX.Set_Error_Code(POSIX.No_Error);
        raise POSIX.POSIX_Error;
exception
        when POSIX.POSIX_Error =>
                Error := POSIX.Get_Error_Code;
                Ada.Text_IO.Put_Line( POSIX.Image(Error) );

end Posix_Test;

Comment 2 Dara Hazeghi 2003-06-20 06:41:19 UTC
Hello,

the additional files needed didn't make it to this report. To attach them, simply view the bug, and 
select "create a new attachment." It should be pretty straightforward. We need those additional 
files to reproduce the bug. Thanks,

Dara
Comment 3 Santiago Urueña Pascual 2003-06-20 07:20:06 UTC
Created attachment 4255 [details]
Source files of the error report

This bug_report_11100.adb contains the following source files:

posix_test.adb

floristlib/posix-sockets.adb
floristlib/posix-sockets.ads
floristlib/posix.ads
floristlib/ada_streams.ads
floristlib/posix-c.ads
floristlib/posix-io.ads
floristlib/posix-permissions.ads
floristlib/posix-process_identification.ads
floristlib/posix-limits.ads
floristlib/posix-implementation.ads
Comment 4 Andrew Pinski 2003-07-09 03:24:35 UTC
Stupid bugzilla, this should still be unconfirmed, I am try this on powerpc-apple-
darwin6.6 (with the mainline, after some fixes to darwin.c) but floristlib is taking a long 
time to compile, I will try tomorrow.  I had to download floristlib because it would be 
tedious to extract the files from the attachment.
Comment 5 Andrew Pinski 2003-07-11 05:13:29 UTC
I cannot get florist to compile on my machine at all, can you use tar to tar up the files?
Example usage of tar:
tar cf bugfiles.tar  floristlib/posix-sockets.adb floristlib/posix-sockets.ads floristlib/
posix.ads ...
Comment 6 Andrew Pinski 2003-07-11 05:26:48 UTC
I should say that the file was created by cat, right, well I do not know which file is what in 
that big file so there is no way to reproduce this without each individual file and that is 
why I want a tar file.
Comment 7 Dara Hazeghi 2003-07-11 07:15:52 UTC
gnatchop doesn't do the trick of separating the files (can't test since I just hosed my gcc 3.4 
installation)?
Comment 8 Andrew Pinski 2003-07-19 17:24:02 UTC
gnatchop choped the files.
We still need posix-sockets-internet.ads even though it is not listed.
Can you attach he file "posix-sockets-internet.ads".
Comment 9 Santiago Urueña Pascual 2003-08-01 11:51:19 UTC
Created attachment 4545 [details]
File posix-sockets-internet.ads
Comment 10 Andrew Pinski 2003-08-10 22:32:10 UTC
Marking as invalid so it can be marked ...
Comment 11 Andrew Pinski 2003-08-10 22:32:32 UTC
unconfirmed.
Comment 12 Andrew Pinski 2003-08-13 15:55:21 UTC
We also need posix.adb.
Comment 13 Santiago Urueña Pascual 2003-08-13 17:55:35 UTC
Created attachment 4601 [details]
File 'posix.adb'
Comment 14 Andrew Pinski 2003-08-14 17:34:52 UTC
Sorry to bother you again but we also need 'posix-io.adb'.
Comment 15 Santiago Urueña Pascual 2003-08-15 01:00:31 UTC
Created attachment 4608 [details]
File 'posix-io.adb'
Comment 16 Andrew Pinski 2003-08-15 03:16:24 UTC
At least one more: posix-permissions-implementation.ads.
There might be others (what about all the files in the same directory as posix-
permissions-implementation.ads, posix.adb, and posix-io.adb?).
Comment 17 Santiago Urueña Pascual 2003-08-15 11:31:33 UTC
Created attachment 4610 [details]
Additional source files of the error report

Contains the following source files (use 'gnatchop' to separate them):

posix-c.adb
posix-implementation.adb
posix-permissions.adb
posix-permissions-implementation.ads
posix-permissions-implementation.adb
posix-process_identification.adb
Comment 18 Andrew Pinski 2003-08-15 20:38:46 UTC
I can reproduce this on the mainline (20030731) on powerpc-apple-dariwn6.6:

+===========================GNAT BUG DETECTED======================
========+
| 3.4 20030731 (experimental) (powerpc-apple-darwin6.6) GCC error:         |
| in convert_move, at expr.c:1307                                          |
| Error detected at posix-sockets.gpb:481:20                               |
| 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).                   |
+===================================================================
=======+

Thanks for providing all the files.
Comment 19 Andrew Pinski 2003-08-28 15:41:22 UTC
Most likely related to bug 12085, a C bug.
Comment 20 gnat-dev 2003-11-08 02:15:15 UTC
Subject: Re:  Internal compiler error: Ada florist-3.15p posix-sockets.gpb:481:20

Here is a simplified test case for [bug ada/11100] ICE on valid code (I
think)

How to reproduce:
    % gunzip bug-11100-ICE.ada.gz
    % gnatchop bug-11100-ICE.ada

As shipped, the failure will +not+ occur; To reproduce, edit
posix-gcc_ice.adb and uncomment either of the fields w/ the comment
"this line fails" or some such. The keyword is "fails", it appears
nowhere else in that file. All the other files are essentially
unchanged from the Florist-3.15p distro.

Then, for those that prefer to use gnatmake directly, just:
    % gnatmake posix-gcc_ice.adb

For the convenience of those that prefer to use a regular make command,
I have include the ones I used for testing:
    % tar xz Makefiles.tgz
    % make posix-gcc_ice.o

The problem seems to be dereferencing an aliased Convention C pointer.

Hope this helps resolve this thing.
== Buz :)

--
Buz Cory of BuzCo Systems -- New York NY USA http://BuzCo dot nyct dot net
<gnat-dev at BuzCo dot nyct dot net> (Buz as GNAT Programmer)
Comment 21 gnat-dev 2003-11-08 02:15:20 UTC
Created attachment 5095 [details]
bug-11100-ICE.ada.gz
Comment 22 gnat-dev 2003-11-08 02:15:20 UTC
Created attachment 5096 [details]
Makefiles.tgz
Comment 23 Arnaud Charlet 2003-11-25 09:33:03 UTC
This PR has become confused IMO: there are dozens of attachements, making it a
real challenge to try to reproduce this issue.

If the problem still reproduces for you, please open a new PR, and attach
a self contained single source file in gnatchop format reproducing
immediately the bug, and simple instructions to compile the file (a single
gcc command, no makefile or script, ...)

Also, if the problem still appears in expr.c, it most likely means that this
is a middle-end issue and not an Ada front-end issue (in which case,
simply watching PR 12085 is probably good enough).

Arno
Comment 24 Eric Botcazou 2003-12-05 20:31:57 UTC
PR 12085 has nothing to do with this one: they have the same symptoms, but not
the same cause at all.