This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/23995] New: GNAT BUG DETECTED


spr16<hmf:spluser>(568) ~/tmp
> gcc -v -gnatv -c  test_gcc_4_0_1.ads
Using built-in specs.
Target: sparc-sun-solaris2.9
Configured with: /usr/local/src/tmp/GCC/4.0/gcc-4.0.1/configure
--prefix=/usr/local/GCC/4.0/1 --enable-threads=posix
--enable-languages=c,ada,c++,f95,java,objc,treelang
--with-gmp=/usr/local/GNU/Maths/GMP/4.1/4/
--with-mpfr=/usr/local/GNU/Maths/GMP/4.1/4/
Thread model: posix
gcc version 4.0.1
 /usr/local/GCC/4.0/1/libexec/gcc/sparc-sun-solaris2.9/4.0.1/gnat1 -quiet
-dumpbase test_gcc_4_0_1.ads -gnatv -mcpu=v7 test_gcc_4_0_1.ads -o /tmp/ccxtpfCn.s

GNAT 4.0.1
Copyright 1992-2005 Free Software Foundation, Inc.

Compiling: test_gcc_4_0_1.ads (source file time stamp: 2005-09-21 10:41:55)
+===========================GNAT BUG DETECTED==============================+
| 4.0.1 (sparc-sun-solaris2.9) in expand_expr_addr_expr_1, at expr.c:6222  |
| No source file position information available                            |
| 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.

test_gcc_4_0_1.ads

 24 lines: No errors
compilation abandoned

test_gcc_4_0_1.ads:
package test_gcc_4_0_1 is

  type test1 is record
      b2 : BOOLEAN := TRUE ;
      b3 : BOOLEAN ;
      b4 : BOOLEAN ;
      b1 : BOOLEAN ;
    end record ;
    FOR test1 use record
      b1 at 0 range 00 .. 00 ;
      b2 at 0 range 01 .. 01 ;
      b3 at 0 range 02 .. 02 ;
      b4 at 0 range 03 .. 03 ;
  end record ;

  type test_A is record
      t1 : test1 ;
    end record ;
    for test_A use record
--      t1 at 0 range 0 ..  3 ;
      t1 at 0 range 1 .. 4 ;
  end record ;

end test_gcc_4_0_1 ;

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

Additional informations:
1. if b2 has no default value, then compiling succeeds
2. if t1 starts at the first bit of a byte (commented line t1 at 0 range 0 ..  3
;), then compiling succeeds.
3. the compiling succeeds with gcc 3.3

Thank you for your help
With best regards
Michael Foerster

-- 
           Summary: GNAT BUG DETECTED
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot foerster at eads dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]