public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost
@ 2005-09-16 11:31 mail at michael-stevens dot de
2005-09-16 13:22 ` [Bug c++/23914] " bangerth at dealii dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: mail at michael-stevens dot de @ 2005-09-16 11:31 UTC (permalink / raw)
To: gcc-bugs
Failing case comes from regression testing using Boost uBLAS with gcc4.0.2
prerelease:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.0.2-20050913/configure
--prefix=/home/michael/locacc402
Thread model: posix
gcc version 4.0.2 20050913 (prerelease)
The failure in this case is caused by
BOOST_STATIC_ASSERT (foo_template<int>::complexity == 0);
where foo_template is defined thus:
template <class T>
struct foo_template {
public:
static const unsigned complexity = 0;
};
N.B. failure only occurs if foo_template is a template class.
Suggestive is that if 'foo_template::complexity' encountered anyware by the
compiler prior to the failing instantiation then problem disappers. Therefore
const unsigned a = foo_template<int>::complexity;
BOOST_STATIC_ASSERT (foo_template<int>::complexity == 0);
is instantiated without error!
Minimal test case without Boost headers is:
template <class T>
struct foo_template {
static const unsigned complexity = 0;
};
template <int x> struct STATIC_ASSERTION {};
void gcc_402_problem_minimal()
{
sizeof(STATIC_ASSERTION< foo_template<int>::complexity >);
}
cc402.cpp: In function ‘void gcc_402_problem_minimal()’:
gcc402.cpp:10: error: ‘foo_template<int>::complexity’ is not a valid template
argument for type ‘int’ because it is a non-constant expression
--
Summary: [4.0 Regression] further 'non-constant' template
argument case exposed by Boost
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mail at michael-stevens dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
@ 2005-09-16 13:22 ` bangerth at dealii dot org
2005-09-16 14:43 ` [Bug c++/23914] [4.0/4.1 " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bangerth at dealii dot org @ 2005-09-16 13:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-09-16 13:21 -------
I am pretty sure this is a duplicate of PR 23896, which was fixed last
night. Can you try with an updated compiler?
Thanks
Wolfgang
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
GCC target triplet|x86_64-unknown-linux-gnu |x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0/4.1 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
2005-09-16 13:22 ` [Bug c++/23914] " bangerth at dealii dot org
@ 2005-09-16 14:43 ` pinskia at gcc dot gnu dot org
2005-09-16 14:45 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-16 14:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-16 14:42 -------
Nope this was not fixed by the patch for 23896, tested on the mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
Status|WAITING |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-09-16 14:42:54
date| |
Summary|[4.0 Regression] further |[4.0/4.1 Regression] further
|'non-constant' template |'non-constant' template
|argument case exposed by |argument case exposed by
|Boost |Boost
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0/4.1 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
2005-09-16 13:22 ` [Bug c++/23914] " bangerth at dealii dot org
2005-09-16 14:43 ` [Bug c++/23914] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2005-09-16 14:45 ` pinskia at gcc dot gnu dot org
2005-09-16 15:33 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-16 14:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0/4.1 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
` (2 preceding siblings ...)
2005-09-16 14:45 ` pinskia at gcc dot gnu dot org
@ 2005-09-16 15:33 ` mmitchel at gcc dot gnu dot org
2005-09-16 18:34 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-16 15:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-09-16 15:32 -------
It's the same idea, but a different bug.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0/4.1 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
` (3 preceding siblings ...)
2005-09-16 15:33 ` mmitchel at gcc dot gnu dot org
@ 2005-09-16 18:34 ` cvs-commit at gcc dot gnu dot org
2005-09-16 18:36 ` cvs-commit at gcc dot gnu dot org
2005-09-16 18:37 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-16 18:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-16 18:33 -------
Subject: Bug 23914
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2005-09-16 18:33:35
Modified files:
gcc/cp : parser.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: static18.C
Log message:
PR c++/23914
* parser.c (cp_parser_enclosed_template_argument_list): Make sure
skip_evaluation is false when processing template arguments.
PR c++/23914
* g++.dg/template/static18.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.358&r2=1.359
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4896&r2=1.4897
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static18.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6071&r2=1.6072
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0/4.1 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
` (4 preceding siblings ...)
2005-09-16 18:34 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-16 18:36 ` cvs-commit at gcc dot gnu dot org
2005-09-16 18:37 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-16 18:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-16 18:36 -------
Subject: Bug 23914
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: mmitchel@gcc.gnu.org 2005-09-16 18:35:59
Modified files:
gcc/cp : parser.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: static18.C
Log message:
PR c++/23914
* parser.c (cp_parser_enclosed_template_argument_list): Make sure
skip_evaluation is false when processing template arguments.
PR c++/23914
* g++.dg/template/static18.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.319.2.17&r2=1.319.2.18
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.106&r2=1.4648.2.107
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static18.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.408&r2=1.5084.2.409
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/23914] [4.0/4.1 Regression] further 'non-constant' template argument case exposed by Boost
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
` (5 preceding siblings ...)
2005-09-16 18:36 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-16 18:37 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-16 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-09-16 18:37 -------
Fixed in 4.0.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23914
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-09-16 18:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-16 11:31 [Bug c++/23914] New: [4.0 Regression] further 'non-constant' template argument case exposed by Boost mail at michael-stevens dot de
2005-09-16 13:22 ` [Bug c++/23914] " bangerth at dealii dot org
2005-09-16 14:43 ` [Bug c++/23914] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-09-16 14:45 ` pinskia at gcc dot gnu dot org
2005-09-16 15:33 ` mmitchel at gcc dot gnu dot org
2005-09-16 18:34 ` cvs-commit at gcc dot gnu dot org
2005-09-16 18:36 ` cvs-commit at gcc dot gnu dot org
2005-09-16 18:37 ` 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).