public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gcc-bugzilla at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/24880]  New: (Ada) Conversion of user-defined integer type with Size fixed causes crashes
Date: Tue, 15 Nov 2005 19:55:00 -0000	[thread overview]
Message-ID: <bug-24880-10300@http.gcc.gnu.org/bugzilla/> (raw)


Explicit conversion from a numeric integer Type to Integer causes a crash of
gcc
when the type is defined with a Size representation clause.
The bug disappears if the representation clause is removed or
if the range begins with 0.

Environment:
System: Linux simone 2.6.12.051101 #1 Tue Nov 1 17:19:34 CET 2005 i686
GNU/Linux
        Debian testing gnat-4.0 Version: 4.0.2-2
Architecture: i686
host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu

How-To-Repeat:
---------------------------- File demo2.adb
procedure Demo2 is
   S : constant := Integer'Size;
   type Regoff_T is range -1 .. 2 ** (S-1);
   for Regoff_T'Size use S;
   B : Integer;
   C : Regoff_T;
begin
   B := Integer (C);
end Demo2;
--------------------------------------------- The crash message
~ gnatmake demo2
gcc-4.0 -c demo2.adb
gcc-4.0: Internal error: Erreur de segmentation (program gnat1)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.

gnatmake: "demo2.adb" compilation error
-------------------------------- with gnat version 3.4
~ gnatmake demo2
gcc-3.4 -c demo2.adb
demo2.adb:6:04: warning: "C" is never assigned a value
gnatbind -x demo2.ali
gnatlink demo2.ali
------------------------------------------------------


------- Comment #1 from nicolas dot boulenguez at free dot fr  2005-11-15 19:55 -------
Fix:
        none


-- 
           Summary: (Ada) Conversion of user-defined integer type with Size
                    fixed causes crashes
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nicolas dot boulenguez at free dot fr
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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


             reply	other threads:[~2005-11-15 19:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15 19:55 gcc-bugzilla at gcc dot gnu dot org [this message]
2005-11-15 20:22 ` [Bug ada/24880] [4.0/4.1 regression] " laurent at guerby dot net
2006-03-08 15:16 ` [Bug ada/24880] [4.0/4.1/4.2 " pinskia at gcc dot gnu dot org
2006-03-11  3:22 ` mmitchel at gcc dot gnu dot org
2007-02-03 15:51 ` [Bug ada/24880] [4.0/4.1/4.2/4.3 regression] " gdr at gcc dot gnu dot org
2007-02-03 17:26 ` jsm28 at gcc dot gnu dot org
2007-02-14  9:36 ` mmitchel at gcc dot gnu dot org
2008-04-12 15:40 ` [Bug ada/24880] [4.1/4.2/4.3/4.4 " sam at gcc dot gnu dot org
2008-04-12 16:07 ` ebotcazou at gcc dot gnu dot org
2008-04-12 16:25 ` sam at gcc dot gnu dot org
2008-05-13  8:47 ` [Bug ada/24880] [4.1/4.2/4.3/4.4 regression] infinite loop on conversion of integer type with size clause ebotcazou at gcc dot gnu dot org
2008-05-13  8:48 ` ebotcazou at gcc dot gnu dot org
2008-05-13  8:53 ` [Bug ada/24880] [4.1/4.2 " ebotcazou at gcc dot gnu dot 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-24880-10300@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: link
Be 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).