public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using
@ 2006-08-30 15:04 pinskia at gcc dot gnu dot org
2006-08-30 15:04 ` [Bug c++/28903] " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-30 15:04 UTC (permalink / raw)
To: gcc-bugs
Testcase:
template <class>
struct View
{
int n;
};
template <class ViewA>
struct ViewDom : View<ViewA>
{
using View<ViewA>::n;
ViewDom();
};
template <class ViewA>
ViewDom<ViewA>::ViewDom()
{
char a[n];
}
void element( )
{
ViewDom<int> a;
}
--
Summary: [4.2 Regression] Rejects VLA in template class's member
with using
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
@ 2006-08-30 15:04 ` pinskia at gcc dot gnu dot org
2006-08-30 15:05 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-30 15:04 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.2.0
Known to work| |4.1.1
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
2006-08-30 15:04 ` [Bug c++/28903] " pinskia at gcc dot gnu dot org
@ 2006-08-30 15:05 ` pinskia at gcc dot gnu dot org
2006-08-30 15:06 ` tbm at cyrius dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-30 15:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-30 15:05 -------
Remove the template from View and this works.
Janis,
Could you do a regression hunt on this bug?
Thanks,
Andrew
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
2006-08-30 15:04 ` [Bug c++/28903] " pinskia at gcc dot gnu dot org
2006-08-30 15:05 ` pinskia at gcc dot gnu dot org
@ 2006-08-30 15:06 ` tbm at cyrius dot com
2006-08-31 17:57 ` janis at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tbm at cyrius dot com @ 2006-08-30 15:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tbm at cyrius dot com 2006-08-30 15:06 -------
Note that this must be very recent. gcc started rejecting this code between
20060806 and 20060823.
--
tbm at cyrius dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tbm at cyrius dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-08-30 15:06 ` tbm at cyrius dot com
@ 2006-08-31 17:57 ` janis at gcc dot gnu dot org
2006-08-31 18:10 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-08-31 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janis at gcc dot gnu dot org 2006-08-31 17:57 -------
A regression hunt on powerpc-linux identified this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=116276
r116276 | mmitchel | 2006-08-20 23:53:10 +0000 (Sun, 20 Aug 2006)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-08-31 17:57 ` janis at gcc dot gnu dot org
@ 2006-08-31 18:10 ` pinskia at gcc dot gnu dot org
2006-09-01 22:24 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-31 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-08-31 18:09 -------
Confirmed by Janis.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |28341
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-08-31 18:09:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-08-31 18:10 ` pinskia at gcc dot gnu dot org
@ 2006-09-01 22:24 ` mmitchel at gcc dot gnu dot org
2006-09-04 2:32 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-01 22:24 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-09-01 22:24 ` mmitchel at gcc dot gnu dot org
@ 2006-09-04 2:32 ` pinskia at gcc dot gnu dot org
2006-09-04 19:09 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-04 2:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-09-04 02:32 -------
The problem is here:
/* The array dimension behaves like a non-type template arg,
in that we want to fold it as much as possible. */
max = tsubst_template_arg (omax, args, complain, in_decl);
max = fold_decl_constant_value (max);
It actually does not behave like one if we the decl is inside a function so
that you can use VLAs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-09-04 2:32 ` pinskia at gcc dot gnu dot org
@ 2006-09-04 19:09 ` mmitchel at gcc dot gnu dot org
2006-09-07 1:05 ` mmitchel at gcc dot gnu dot org
2006-09-07 1:10 ` mmitchel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-04 19:09 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
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=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2006-09-04 19:09 ` mmitchel at gcc dot gnu dot org
@ 2006-09-07 1:05 ` mmitchel at gcc dot gnu dot org
2006-09-07 1:10 ` mmitchel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-07 1:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2006-09-07 01:04 -------
Subject: Bug 28903
Author: mmitchel
Date: Thu Sep 7 01:04:07 2006
New Revision: 116736
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116736
Log:
PR c++/28903
* pt.c (tsubst): Use fold_non_dependent_expr to fold array
dimensions.
PR c++/28886
* pt.c (unify): Avoid unnecessary calls to fold_build2 for array
dimensions.
Added:
trunk/gcc/testsuite/g++.dg/ext/vla3.C
trunk/gcc/testsuite/g++.dg/template/array16.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/28903] [4.2 Regression] Rejects VLA in template class's member with using
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2006-09-07 1:05 ` mmitchel at gcc dot gnu dot org
@ 2006-09-07 1:10 ` mmitchel at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-07 1:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2006-09-07 01:09 -------
Fixed in 4.2.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28903
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-09-07 1:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-30 15:04 [Bug c++/28903] New: [4.2 Regression] Rejects VLA in template class's member with using pinskia at gcc dot gnu dot org
2006-08-30 15:04 ` [Bug c++/28903] " pinskia at gcc dot gnu dot org
2006-08-30 15:05 ` pinskia at gcc dot gnu dot org
2006-08-30 15:06 ` tbm at cyrius dot com
2006-08-31 17:57 ` janis at gcc dot gnu dot org
2006-08-31 18:10 ` pinskia at gcc dot gnu dot org
2006-09-01 22:24 ` mmitchel at gcc dot gnu dot org
2006-09-04 2:32 ` pinskia at gcc dot gnu dot org
2006-09-04 19:09 ` mmitchel at gcc dot gnu dot org
2006-09-07 1:05 ` mmitchel at gcc dot gnu dot org
2006-09-07 1:10 ` 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).