* [Bug c++/40975] internal compiler error: in copy_tree_r, at tree-inline.c
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
@ 2011-02-12 10:24 ` Vanuan at gmail dot com
2011-04-19 13:48 ` zsojka at seznam dot cz
` (14 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: Vanuan at gmail dot com @ 2011-02-12 10:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Vanuan at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Vanuan at gmail dot com
--- Comment #3 from Vanuan at gmail dot com 2011-02-12 10:12:34 UTC ---
The same problem using c++0x initializer list:
int some_func(int some_array[] = new int[2]{1,2}) {
}
int main() {
some_func();
}
$ g++ -std=c++0x test.cpp
test.cpp: In function ‘int main()’:
test.cpp:5: internal compiler error: in copy_tree_r, at tree-inline.c:3725
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] internal compiler error: in copy_tree_r, at tree-inline.c
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
2011-02-12 10:24 ` [Bug c++/40975] internal compiler error: in copy_tree_r, at tree-inline.c Vanuan at gmail dot com
@ 2011-04-19 13:48 ` zsojka at seznam dot cz
2011-04-19 15:09 ` zsojka at seznam dot cz
` (13 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: zsojka at seznam dot cz @ 2011-04-19 13:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Zdenek Sojka <zsojka at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zsojka at seznam dot cz
--- Comment #4 from Zdenek Sojka <zsojka at seznam dot cz> 2011-04-19 13:47:53 UTC ---
This is still happening in current trunk (4.7).
Tested revisions:
4.0.4, 4.1.2, 4.2.4, 4.3.5, 4.4.5, 4.5.2, 4.6.0, 4.7.0 - crash
3.3.6, 3.4.6 - OK (without checking)
It might be a regression from 3.4, but I don't have a build with checking
enabled to verify.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] internal compiler error: in copy_tree_r, at tree-inline.c
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
2011-02-12 10:24 ` [Bug c++/40975] internal compiler error: in copy_tree_r, at tree-inline.c Vanuan at gmail dot com
2011-04-19 13:48 ` zsojka at seznam dot cz
@ 2011-04-19 15:09 ` zsojka at seznam dot cz
2011-04-19 15:12 ` [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
` (12 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: zsojka at seznam dot cz @ 2011-04-19 15:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #5 from Zdenek Sojka <zsojka at seznam dot cz> 2011-04-19 15:08:36 UTC ---
Indeed 3.4 works even with checking enabled:
$ /mnt/sda1/gcc-3_4/binary-172709/bin/g++ pr40975.C -c
$ g++ -v
Reading specs from
/mnt/sda1/gcc-3_4/binary-172709/bin/../lib/gcc/x86_64-unknown-linux-gnu/3.4.6/specs
Configured with: /mnt/sda1/gcc-3_4/configure --enable-checking=yes
--enable-languages=c,c++ --prefix=/mnt/sda1/gcc-3_4/binary-172709/
--disable-werror --disable-bootstrap --disable-multilib
Thread model: posix
gcc version 3.4.6
(I can't edit the "known to work/fail" fields, nor the summary)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] internal compiler error: in copy_tree_r, at tree-inline.c
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-04-19 15:09 ` zsojka at seznam dot cz
@ 2011-04-19 15:12 ` rguenth at gcc dot gnu.org
2011-04-26 21:06 ` [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] ICE in copy_tree_r on array new jsm28 at gcc dot gnu.org
` (11 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-19 15:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |3.4.6
Target Milestone|--- |4.3.6
Summary|internal compiler error: in |[4.3/4.4/4.5/4.6/4.7
|copy_tree_r, at |Regression] internal
|tree-inline.c |compiler error: in
| |copy_tree_r, at
| |tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-04-19 15:12 ` [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-04-26 21:06 ` jsm28 at gcc dot gnu.org
2011-04-27 16:36 ` jason at gcc dot gnu.org
` (10 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2011-04-26 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Joseph S. Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2011-04-26 21:06 ` [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] ICE in copy_tree_r on array new jsm28 at gcc dot gnu.org
@ 2011-04-27 16:36 ` jason at gcc dot gnu.org
2011-04-28 1:55 ` jason at gcc dot gnu.org
` (9 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-04-27 16:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6/4.7 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2011-04-27 16:36 ` jason at gcc dot gnu.org
@ 2011-04-28 1:55 ` jason at gcc dot gnu.org
2011-04-28 17:18 ` [Bug c++/40975] [4.3/4.4/4.5/4.6 " jason at gcc dot gnu.org
` (8 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-04-28 1:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2011-04-28 01:53:38 UTC ---
Author: jason
Date: Thu Apr 28 01:53:34 2011
New Revision: 173056
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173056
Log:
PR c++/40975
* cp-tree.def (VEC_INIT_EXPR): Add third operand.
* cp-tree.h (VEC_INIT_EXPR_NELTS): New.
* cp-gimplify.c (cp_gimplify_expr) [VEC_INIT_EXPR]: Handle it.
* tree.c (build_vec_init_expr): Handle getting pointer/nelts.
(build_vec_init_elt): Don't expect an array type.
(build_array_copy): Adjust.
* init.c (perform_member_init): Adjust.
(build_new_1): Use build_vec_init_expr.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist49.C
trunk/gcc/testsuite/g++.dg/init/new30.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/c-family/c-common.h
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/cp/cp-tree.def
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/init.c
trunk/gcc/cp/method.c
trunk/gcc/cp/tree.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2011-04-28 1:55 ` jason at gcc dot gnu.org
@ 2011-04-28 17:18 ` jason at gcc dot gnu.org
2011-04-28 17:42 ` dnovillo at google dot com
` (7 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-04-28 17:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu.org
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-04-28 15:57:06 UTC ---
This was broken by the tree-ssa merge, r81764, which introduced STATEMENT_LIST
and caused copy_tree_r to abort on it. Diego, do you happen to remember the
rationale for that? Why can't we copy a STATEMENT_LIST in a
statement-expression?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2011-04-28 17:18 ` [Bug c++/40975] [4.3/4.4/4.5/4.6 " jason at gcc dot gnu.org
@ 2011-04-28 17:42 ` dnovillo at google dot com
2011-05-02 22:04 ` jason at gcc dot gnu.org
` (6 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: dnovillo at google dot com @ 2011-04-28 17:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #8 from dnovillo at google dot com <dnovillo at google dot com> 2011-04-28 17:37:29 UTC ---
On Thu, Apr 28, 2011 at 13:01, jason at gcc dot gnu.org
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
>
> Jason Merrill <jason at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |dnovillo at gcc dot gnu.org
>
> --- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-04-28 15:57:06 UTC ---
> This was broken by the tree-ssa merge, r81764, which introduced STATEMENT_LIST
> and caused copy_tree_r to abort on it. Diego, do you happen to remember the
> rationale for that? Why can't we copy a STATEMENT_LIST in a
> statement-expression?
Oh, boy. Sorry. I do not remember why we added that assertion. It
may have been to avoid recursing twice, since copy_tree_r is typically
called to copy individual statements in a list. So, we never expected
to find STATEMENT_LISTs inside a single statement.
This may be largely unnecessary now.
Diego.
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2011-04-28 17:42 ` dnovillo at google dot com
@ 2011-05-02 22:04 ` jason at gcc dot gnu.org
2011-05-02 22:10 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-02 22:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-02 22:00:13 UTC ---
Author: jason
Date: Mon May 2 22:00:07 2011
New Revision: 173274
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173274
Log:
Revert:
PR c++/40975
* cp-tree.def (VEC_INIT_EXPR): Add third operand.
* cp-tree.h (VEC_INIT_EXPR_NELTS): New.
* cp-gimplify.c (cp_gimplify_expr) [VEC_INIT_EXPR]: Handle it.
* tree.c (build_vec_init_expr): Handle getting pointer/nelts.
(build_vec_init_elt): Don't expect an array type.
(build_array_copy): Adjust.
* init.c (perform_member_init): Adjust.
(build_new_1): Use build_vec_init_expr.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/cp/cp-tree.def
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/init.c
trunk/gcc/cp/method.c
trunk/gcc/cp/tree.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2011-05-02 22:04 ` jason at gcc dot gnu.org
@ 2011-05-02 22:10 ` jason at gcc dot gnu.org
2011-05-05 20:54 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-02 22:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-02 21:59:59 UTC ---
Author: jason
Date: Mon May 2 21:59:57 2011
New Revision: 173273
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173273
Log:
PR c++/40975
* tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2011-05-02 22:10 ` jason at gcc dot gnu.org
@ 2011-05-05 20:54 ` jason at gcc dot gnu.org
2011-05-05 21:04 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-05 20:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-05 20:51:00 UTC ---
Author: jason
Date: Thu May 5 20:50:57 2011
New Revision: 173451
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173451
Log:
PR c++/40975
* tree-inline.c (copy_tree_r): Use copy_statement_list.
(copy_statement_list): Don't recurse.
* stor-layout.c (copy_self_referential_tree_r): Don't allow
STATEMENT_LIST.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/stor-layout.c
trunk/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2011-05-05 20:54 ` jason at gcc dot gnu.org
@ 2011-05-05 21:04 ` jason at gcc dot gnu.org
2011-05-05 21:06 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-05 21:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-05 21:02:09 UTC ---
Author: jason
Date: Thu May 5 21:02:06 2011
New Revision: 173452
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173452
Log:
PR c++/40975
* tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/init/new30.C
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2011-05-05 21:04 ` jason at gcc dot gnu.org
@ 2011-05-05 21:06 ` jason at gcc dot gnu.org
2011-05-05 21:12 ` jason at gcc dot gnu.org
2011-05-05 21:20 ` jason at gcc dot gnu.org
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-05 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-05 21:02:53 UTC ---
Author: jason
Date: Thu May 5 21:02:51 2011
New Revision: 173454
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173454
Log:
PR c++/40975
* tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/init/new30.C
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
branches/gcc-4_4-branch/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2011-05-05 21:06 ` jason at gcc dot gnu.org
@ 2011-05-05 21:12 ` jason at gcc dot gnu.org
2011-05-05 21:20 ` jason at gcc dot gnu.org
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-05 21:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-05 21:02:48 UTC ---
Author: jason
Date: Thu May 5 21:02:45 2011
New Revision: 173453
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173453
Log:
PR c++/40975
* tree-inline.c (copy_tree_r): Handle STATEMENT_LIST.
Added:
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/init/new30.C
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/40975] [4.3/4.4/4.5/4.6 Regression] ICE in copy_tree_r on array new
[not found] <bug-40975-4@http.gcc.gnu.org/bugzilla/>
` (14 preceding siblings ...)
2011-05-05 21:12 ` jason at gcc dot gnu.org
@ 2011-05-05 21:20 ` jason at gcc dot gnu.org
15 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2011-05-05 21:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40975
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.3.6 |4.4.7
--- Comment #15 from Jason Merrill <jason at gcc dot gnu.org> 2011-05-05 21:06:56 UTC ---
Fixed in 4.4-4.7 branches. The patch doesn't fix the bug in the 4.3 branch, so
I'm going to leave it unfixed there.
^ permalink raw reply [flat|nested] 16+ messages in thread