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; 11+ 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] 11+ messages in thread
* [Bug c++/23426] partial fix too large array problem
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 ` wilson at gcc dot gnu dot org
2005-08-16 18:47 ` wilson at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-08-16 18:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-08-16 18:45 -------
Created an attachment (id=9504)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9504&action=view)
Patch to partially fix problem with too large arrays.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] partial fix too large array problem
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
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-08-16 18:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-08-16 18:46 -------
Created an attachment (id=9505)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9505&action=view)
Testcase for too large array problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] partial fix too large array problem
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 ` pinskia at gcc dot gnu dot org
2005-08-18 15:59 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 2:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 02:40 -------
Confirmed. A regression from 3.4.0.
Note there is a typo in the test, USHORT_MAX should be USHRT_MAX.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-08-17 02:40:11
date| |
Summary|partial fix too large array |[4.0/4.1 Regression] partial
|problem |fix too large array problem
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] partial fix too large array problem
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (2 preceding siblings ...)
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
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-18 15:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-18 15:59 -------
*** Bug 23461 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pete at void dot printf dot
| |net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] partial fix too large array problem
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (3 preceding siblings ...)
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
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-08-22 5:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-08-22 05:03 -------
I think the knock-on error message is a latent bug in the C++ front end, so your
patch is fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] partial fix too large array problem
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (4 preceding siblings ...)
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
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-23 0:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-22 23:56 -------
Subject: Bug 23426
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: wilson@gcc.gnu.org 2005-08-22 23:56:30
Modified files:
gcc/cp : ChangeLog
Log message:
Correct PR number in last patch checked in.
PR tree-optimization/23426
* decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
array size check.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4855&r2=1.4856
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] partial fix too large array problem
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (5 preceding siblings ...)
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
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-23 0:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-23 00:08 -------
Subject: Bug 23426
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: wilson@gcc.gnu.org 2005-08-23 00:07:48
Modified files:
gcc/cp : ChangeLog decl.c
Log message:
Partial fix for too large array problem.
PR tree-optimization/23426
* decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
array size check.
Backport from mainline
2005-06-14 Roger Sayle <roger@eyesopen.com>
* decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.79&r2=1.4648.2.80
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1371.2.18&r2=1.1371.2.19
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] partial fix too large array problem
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (6 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-08-23 0:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-08-23 00:10 -------
I've added my patch to mainline and the gcc-4.0.x branch, but there is still the
problem that my testcase generates two errors when it should only generate one.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] Too large array problem gives two error message
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-08-23 0:36 ` wilson at gcc dot gnu dot org
@ 2005-08-23 11:46 ` pinskia at gcc dot gnu dot org
2005-09-27 15:57 ` mmitchel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-23 11:46 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-23 11:44 -------
earth:~>gcc t.cc
t.cc: In function int main():
t.cc:19: error: size of array a is too large
t.cc:20: error: a was not declared in this scope
earth:~>~/ia32_linux_gcc3_4/bin/gcc t.cc
t.cc: In function `int main()':
t.cc:19: error: size of variable 'a' is too large
earth:~>gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /home/peshtigo/pinskia/src/gnu/gcc/src/configure --target=i686-pc-linux-gnu --
host=i686-pc-linux-gnu --enable-__cxa_atexit --enable-languages=c++,objc,java,f95 --prefix=/
home/gates/pinskia/linux --enable-threads=posix --enable-shared
Thread model: posix
gcc version 4.1.0 20050823 (experimental)
So the error message is also a regression but that makes this minor as the first error message is
correct.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Keywords|ice-on-invalid-code |diagnostic
Known to fail| |4.0.0 4.1.0
Known to work| |3.4.0
Summary|[4.0/4.1 Regression] partial|[4.0/4.1 Regression] Too
|fix too large array problem |large array problem gives
| |two error message
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/23426] [4.0/4.1 Regression] Too large array problem gives two error message
2005-08-16 18:44 [Bug c++/23426] New: partial fix too large array problem wilson at gcc dot gnu dot org
` (8 preceding siblings ...)
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
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 15:57 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23426
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-09-27 15:57 UTC | newest]
Thread overview: 11+ 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
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).