public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof)
@ 2004-03-17 8:52 schmid at snake dot iap dot physik dot tu-darmstadt dot de
2004-03-17 12:16 ` [Bug c++/14616] [3.3?/3.4/3.5 regression] " giovannibajo at libero dot it
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: schmid at snake dot iap dot physik dot tu-darmstadt dot de @ 2004-03-17 8:52 UTC (permalink / raw)
To: gcc-bugs
The appended file t.C, a reduced version of the file boost/libs/disjoint_sets/
disjoint_set_test.cpp, does not compile. Gcc 3.4.0 built on 2004-03-05 or the
day before accepted the original code. I am wondering whether it is legal. If I
define elts as elts[4] the code compiles. When I make do_test a free function
the code is also accepted.
template <typename DisjointSet>
struct test_disjoint_set {
static void do_test()
{
#if 1
unsigned int elts[]
#else
unsigned int elts[4]
#endif
= { 0, 1, 2, 3 };
const int N = sizeof(elts)/sizeof(*elts);
}
};
"g++" -v -c -Wall -W "/home/peter/gnu/test/boost/libs/disjoint_sets/t.C"
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c
++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.0 20040313 (prerelease)
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -quiet -v
-D_GNU_SOURCE /home/peter/gnu/test/boost/libs/disjoint_sets/t.C -quiet
-dumpbase t.C -mtune=pentiumpro -auxbase t -Wall -W -version -o /tmp/ccbUIG2T.s
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/
i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
i686-pc-linux-gnu
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
backward
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include
/usr/include
End of search list.
GNU C++ version 3.4.0 20040313 (prerelease) (i686-pc-linux-gnu)
compiled by GNU C version 3.4.0 20040313 (prerelease).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274
/home/peter/gnu/test/boost/libs/disjoint_sets/t.C: In static member function
`static void test_disjoint_set<DisjointSet>::do_test()':
/home/peter/gnu/test/boost/libs/disjoint_sets/t.C:11: error: invalid
application of `sizeof' to an incomplete type
--
Summary: disjoint_set_test.cpp from boost does not compile
(sizeof)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: schmid at snake dot iap dot physik dot tu-darmstadt dot
de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 686-pc-linux-gnu
GCC host triplet: 686-pc-linux-gnu
GCC target triplet: 686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.3?/3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
@ 2004-03-17 12:16 ` giovannibajo at libero dot it
2004-03-17 12:28 ` giovannibajo at libero dot it
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-17 12:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-03-17 12:15 -------
Yes, looks like a recent regression. I don't have a new enough 3.3 to check if
it's present there. If anybody can spot the patch that introduced the
regression, it would help.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Known to fail| |3.3.3
Known to work| |3.4.0 3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-03-17 12:15:59
date| |
Summary|disjoint_set_test.cpp from |[3.3?/3.4/3.5 regression]
|boost does not compile |disjoint_set_test.cpp from
|(sizeof) |boost does not compile
| |(sizeof)
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.3?/3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
2004-03-17 12:16 ` [Bug c++/14616] [3.3?/3.4/3.5 regression] " giovannibajo at libero dot it
@ 2004-03-17 12:28 ` giovannibajo at libero dot it
2004-03-17 13:09 ` giovannibajo at libero dot it
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-17 12:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-03-17 12:28 -------
Ah yes, of course it's again another latent problem exposed by my patch to fold
intializers in templates.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.3?/3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
2004-03-17 12:16 ` [Bug c++/14616] [3.3?/3.4/3.5 regression] " giovannibajo at libero dot it
2004-03-17 12:28 ` giovannibajo at libero dot it
@ 2004-03-17 13:09 ` giovannibajo at libero dot it
2004-03-17 13:55 ` giovannibajo at libero dot it
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-17 13:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-03-17 13:09 -------
The problem is that cp_finish_decl early exits for templates, before calling
check_initializer, which calls maybe_deduce_size_for_array_init, which computes
the domain of the array type.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |giovannibajo at libero dot
|dot org |it
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.3?/3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (2 preceding siblings ...)
2004-03-17 13:09 ` giovannibajo at libero dot it
@ 2004-03-17 13:55 ` giovannibajo at libero dot it
2004-03-17 15:38 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-17 13:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-03-17 13:55 -------
I attacched a straightforward patch, but it causes some regressions I can't fix
right now. Maybe a first step for somebody else.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
AssignedTo|giovannibajo at libero dot |nobody at gcc dot gnu dot
|it |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.3?/3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (3 preceding siblings ...)
2004-03-17 13:55 ` giovannibajo at libero dot it
@ 2004-03-17 15:38 ` pinskia at gcc dot gnu dot org
2004-03-19 8:17 ` [Bug c++/14616] [3.4/3.5 " mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-17 15:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|nobody at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (4 preceding siblings ...)
2004-03-17 15:38 ` pinskia at gcc dot gnu dot org
@ 2004-03-19 8:17 ` mmitchel at gcc dot gnu dot org
2004-03-19 9:43 ` reichelt at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-19 8:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-03-19 08:17 -------
We need to fix this for GCC 3.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (5 preceding siblings ...)
2004-03-19 8:17 ` [Bug c++/14616] [3.4/3.5 " mmitchel at gcc dot gnu dot org
@ 2004-03-19 9:43 ` reichelt at gcc dot gnu dot org
2004-03-20 2:20 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-03-19 9:43 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
GCC build triplet|686-pc-linux-gnu |
GCC host triplet|686-pc-linux-gnu |
GCC target triplet|686-pc-linux-gnu |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (6 preceding siblings ...)
2004-03-19 9:43 ` reichelt at gcc dot gnu dot org
@ 2004-03-20 2:20 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:45 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-20 2:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-03-20 02:20 -------
Givoanni, do you remember what regressions this patch caused?
It looks like the right idea to me, and I'm testing a variant of it now...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (7 preceding siblings ...)
2004-03-20 2:20 ` mmitchel at gcc dot gnu dot org
@ 2004-03-21 17:45 ` cvs-commit at gcc dot gnu dot org
2004-03-21 17:48 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-21 17:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-21 17:45 -------
Subject: Bug 14616
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-03-21 17:45:28
Modified files:
gcc/cp : ChangeLog decl.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: array13.C
Log message:
PR c++/14616
* decl.c (cp_finish_decl): Compute the size of arrays declared in
templates, if their type is non-dependent.
PR c++/14616
* g++.dg/init/array13.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.87&r2=1.3892.2.88
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1174.2.16&r2=1.1174.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.153&r2=1.3389.2.154
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array13.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (8 preceding siblings ...)
2004-03-21 17:45 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-21 17:48 ` cvs-commit at gcc dot gnu dot org
2004-03-21 17:48 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:53 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-21 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-21 17:48 -------
Subject: Bug 14616
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-03-21 17:48:39
Modified files:
gcc/cp : ChangeLog decl.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: array13.C
Log message:
PR c++/14616
* decl.c (cp_finish_decl): Compute the size of arrays declared in
templates, if their type is non-dependent.
PR c++/14616
* g++.dg/init/array13.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4006&r2=1.4007
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1197&r2=1.1198
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3623&r2=1.3624
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/array13.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (9 preceding siblings ...)
2004-03-21 17:48 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-21 17:48 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:53 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-21 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-03-21 17:48 -------
Fixed in GCC 3.4 and GCC 3.5.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/14616] [3.4/3.5 regression] disjoint_set_test.cpp from boost does not compile (sizeof)
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
` (10 preceding siblings ...)
2004-03-21 17:48 ` mmitchel at gcc dot gnu dot org
@ 2004-03-21 17:53 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-21 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-03-21 17:53 -------
Fixed in GCC 3.4 and GCC 3.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14616
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-03-21 17:53 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17 8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
2004-03-17 12:16 ` [Bug c++/14616] [3.3?/3.4/3.5 regression] " giovannibajo at libero dot it
2004-03-17 12:28 ` giovannibajo at libero dot it
2004-03-17 13:09 ` giovannibajo at libero dot it
2004-03-17 13:55 ` giovannibajo at libero dot it
2004-03-17 15:38 ` pinskia at gcc dot gnu dot org
2004-03-19 8:17 ` [Bug c++/14616] [3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-03-19 9:43 ` reichelt at gcc dot gnu dot org
2004-03-20 2:20 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:45 ` cvs-commit at gcc dot gnu dot org
2004-03-21 17:48 ` cvs-commit at gcc dot gnu dot org
2004-03-21 17:48 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:53 ` 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).