public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23426] New: partial fix too large array problem
@ 2005-08-16 18:44 wilson at gcc dot gnu dot org
  2005-08-16 18:47 ` [Bug c++/23426] " wilson at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-08-16 18:44 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1529 bytes --]

A testcase that has an array larger than half the address space and smaller than
the address space will trigger an abort in tree_int_cst_low.

The problem here is that we have a TREE_OVERFLOW (TYPE_SIZE (...)) check in the
C++ front end.  This no longer works now that TYPE_SIZE is computed as
bitsizetype which has extra precision.  We must use TYPE_SIZE_UNIT instead. 
This is trivial to fix, but now the testcase gets two errors instead of the
expected one error.  I don't know if this is intended behaviour, or whether this
is a latent bug in the C++ front end.  Either way, my testcase doesn't work for
the testsuite because of this problem, so a C++ front end maintainer will have
to decide what to do.

Result without the patch
large-size-array.cc: In function ‘int main()’:
large-size-array.cc:17: internal compiler error: in tree_low_cst, at tree.c:4270

Result with the patch
large-size-array.cc: In function ‘int main()’:
large-size-array.cc:19: error: size of array ‘a’ is too large
large-size-array.cc:20: error: ‘a’ was not declared in this scope

Both of these results are wrong.

-- 
           Summary: partial fix too large array problem
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wilson at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <bug-23426-338@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-28 14:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
2005-08-16 18:47 ` [Bug c++/23426] " wilson at gcc dot gnu dot org
2005-08-16 18:47 ` wilson at gcc dot gnu dot org
2005-08-17  2:43 ` [Bug c++/23426] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-08-18 15:59 ` pinskia at gcc dot gnu dot org
2005-08-22  5:03 ` mmitchel at gcc dot gnu dot org
2005-08-23  0:09 ` cvs-commit at gcc dot gnu dot org
2005-08-23  0:10 ` cvs-commit at gcc dot gnu dot org
2005-08-23  0:36 ` wilson at gcc dot gnu dot org
2005-08-23 11:46 ` [Bug c++/23426] [4.0/4.1 Regression] Too large array problem gives two error message pinskia at gcc dot gnu dot org
2005-09-27 15:57 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-23426-338@http.gcc.gnu.org/bugzilla/>
2005-10-27  1:56 ` pinskia at gcc dot gnu dot org
2005-10-27 14:01 ` pinskia at gcc dot gnu dot org
2005-10-28  3:57 ` pinskia at gcc dot gnu dot org
2005-10-28  4:18 ` pinskia at gcc dot gnu dot org
2005-10-28 14:51 ` pinskia at gcc dot gnu dot org
2005-10-28 14:57 ` pinskia at gcc dot gnu dot org
2005-10-28 14:58 ` pinskia at gcc dot gnu dot org

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