public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
@ 2011-01-07 12:41 zsojka at seznam dot cz
2011-01-07 15:37 ` [Bug c++/47211] " ktietz at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-07 12:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
Summary: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with
-fms-extensions
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Created attachment 22924
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22924
reduced testcase (from g++.old-deja/g++.benjamin/13908.C)
Compiler output:
$ gcc -fms-extensions pr47211.C
pr47211.C: In member function 'void chile::bar(chile::pmf)':
pr47211.C:6:21: internal compiler error: in cp_build_addr_expr_1, at
cp/typeck.c:4866
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(gdb) bt
#0 fancy_abort (file=0x121c208
"/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/typeck.c", line=4866,
function=0x121f110 "cp_build_addr_expr_1") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/diagnostic.c:892
#1 0x00000000005fe948 in cp_build_addr_expr_1 (arg=0x7ffff7ff90a8,
strict_lvalue=<value optimized out>, complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/typeck.c:4866
#2 0x00000000005fefb3 in build_x_unary_op (code=ADDR_EXPR,
xarg=0x7ffff7ff90a8, complain=3)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/typeck.c:4598
#3 0x00000000005dabcc in cp_parser_unary_expression (parser=0x7ffff5d270b0,
address_p=0 '\000', cast_p=0 '\000', pidk=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:6120
#4 0x00000000005db188 in cp_parser_binary_expression (parser=0x7ffff5d270b0,
cast_p=<value optimized out>,
no_toplevel_fold_p=0 '\000', prec=PREC_NOT_OPERATOR, pidk=<value optimized
out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:6817
#5 0x00000000005db6a3 in cp_parser_assignment_expression
(parser=0x7ffff5d270b0, cast_p=0 '\000', pidk=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7036
#6 0x00000000005dba3a in cp_parser_expression (parser=0x7ffff5d270b0,
cast_p=<value optimized out>, pidk=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7182
#7 0x00000000005dbe62 in cp_parser_expression_statement
(parser=0x7ffff5d270b0, in_statement_expr=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8300
#8 0x00000000005cdb00 in cp_parser_statement (parser=0x7ffff5d270b0,
in_statement_expr=0x0,
in_compound=<value optimized out>, if_p=<value optimized out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8161
#9 0x00000000005ced46 in cp_parser_statement_seq_opt (parser=0x7ffff5d270b0,
in_statement_expr=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8414
#10 0x00000000005cee7c in cp_parser_compound_statement (parser=0x7ffff5d270b0,
in_statement_expr=0x0,
in_try=<value optimized out>) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:8368
#11 0x00000000005e28dc in cp_parser_function_body (parser=0x7ffff5d270b0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16371
#12 cp_parser_ctor_initializer_opt_and_function_body (parser=0x7ffff5d270b0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16408
#13 0x00000000005e3052 in cp_parser_function_definition_after_declarator
(parser=0x7ffff5d270b0, inline_p=1 '\001')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:19814
#14 0x00000000005d1414 in cp_parser_late_parsing_for_member
(parser=0x7ffff5d270b0, flags=<value optimized out>,
decl_specs=0x7fffffffd780, is_declaration=1 '\001',
declares_class_or_enum=0x7fffffffd718,
is_cv_qualifier=<value optimized out>) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:20396
#15 cp_parser_class_specifier (parser=0x7ffff5d270b0, flags=<value optimized
out>, decl_specs=0x7fffffffd780,
is_declaration=1 '\001', declares_class_or_enum=0x7fffffffd718,
is_cv_qualifier=<value optimized out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:17081
#16 cp_parser_type_specifier (parser=0x7ffff5d270b0, flags=<value optimized
out>, decl_specs=0x7fffffffd780,
is_declaration=1 '\001', declares_class_or_enum=0x7fffffffd718,
is_cv_qualifier=<value optimized out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:12536
#17 0x00000000005d24e8 in cp_parser_decl_specifier_seq (parser=0x7ffff5d270b0,
flags=1, decl_specs=0x7fffffffd780,
declares_class_or_enum=0x7fffffffd7e8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9969
#18 0x00000000005e97bb in cp_parser_simple_declaration (parser=0x7ffff5d270b0,
function_definition_allowed_p=1 '\001')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9626
#19 0x00000000005e9be7 in cp_parser_block_declaration (parser=0x7ffff5d270b0,
statement_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9587
#20 cp_parser_block_declaration (parser=0x7ffff5d270b0, statement_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9521
#21 0x00000000005ed8f2 in cp_parser_declaration (parser=0x7ffff5d270b0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9492
#22 cp_parser_declaration (parser=0x7ffff5d270b0) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9399
#23 0x00000000005ec41a in cp_parser_declaration_seq_opt (parser=0x7ffff5d270b0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9378
#24 0x00000000005edf69 in cp_parser_translation_unit () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:3461
#25 c_parse_file () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:25214
#26 0x00000000006c2195 in c_common_parse_file () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/c-family/c-opts.c:1071
#27 0x0000000000a24598 in compile_file (argc=14, argv=0x7fffffffdab8)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:579
#28 do_compile (argc=14, argv=0x7fffffffdab8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1874
#29 toplev_main (argc=14, argv=0x7fffffffdab8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1937
#30 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6
#31 0x00000000004fef2d in _start ()
Output - 3.3.6, 3.4.6:
$ gcc-3.4.6 -fms-extensions pr47211.C
pr47211.C: In member function `void chile::bar(void (chile::*)())':
pr47211.C:6: error: taking address of bound pointer-to-member expression
Tested revisions:
r168552 - crash
4.5 r168062 - infinite loop?
4.4 r168062 - infinite loop?
4.0.4, 4.1.2 - infinite loop?
3.3.6, 3.4.6 - error
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/47211] ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
@ 2011-01-07 15:37 ` ktietz at gcc dot gnu.org
2011-01-07 15:58 ` zsojka at seznam dot cz
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-07 15:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu.org
--- Comment #1 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-07 15:25:52 UTC ---
Just one question here about this scenario you've shown. Is this valid code in
VC, or is your issue here the assert and missing diagnostic message?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/47211] ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
2011-01-07 15:37 ` [Bug c++/47211] " ktietz at gcc dot gnu.org
@ 2011-01-07 15:58 ` zsojka at seznam dot cz
2011-01-07 16:57 ` zsojka at seznam dot cz
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-07 15:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
--- Comment #2 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-07 15:40:25 UTC ---
Thank you for your reply. I got that ICE when running the testsuite with
-fms-extensions in RUNTESTFLAGS (actually, this isn't the only ICE caused by
-fms-extensions, but the patch you posted may fix all the problems). I hope to
find out whether it's valid or not in MSVC soon (as in, today)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/47211] ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
2011-01-07 15:37 ` [Bug c++/47211] " ktietz at gcc dot gnu.org
2011-01-07 15:58 ` zsojka at seznam dot cz
@ 2011-01-07 16:57 ` zsojka at seznam dot cz
2011-01-19 22:00 ` zsojka at seznam dot cz
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-07 16:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
Zdenek Sojka <zsojka at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-07 16:32:39 UTC ---
The example is rejected by MSVC with error C2298:
http://msdn.microsoft.com/en-us/library/zkcy3ee2.aspx
The problem seems to be taking the address of (this->*pmethod), which would be
the same as error generated by gcc.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/47211] ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
` (2 preceding siblings ...)
2011-01-07 16:57 ` zsojka at seznam dot cz
@ 2011-01-19 22:00 ` zsojka at seznam dot cz
2014-02-14 19:44 ` reichelt at gcc dot gnu.org
2021-12-02 8:09 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-19 22:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
--- Comment #4 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-19 21:30:38 UTC ---
Created attachment 23034
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23034
different crash
This crashes with different message:
$ gcc -fms-extensions pr47211-2.C
pr47211-2.C: In function 'void foo(void (A::*)())':
pr47211-2.C:9:9: internal compiler error: in build_ptrmemfunc, at
cp/typeck.c:7047
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
When foo() is not a template, it ICEs in cp_build_addr_expr_1, at
cp/typeck.c:4866
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/47211] ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
` (3 preceding siblings ...)
2011-01-19 22:00 ` zsojka at seznam dot cz
@ 2014-02-14 19:44 ` reichelt at gcc dot gnu.org
2021-12-02 8:09 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-14 19:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-02-14
CC| |reichelt at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #5 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed.
The non-template version ICEs since GCC 4.6.0 and loops forever with GCC 4.0.0
- 4.5.3.
The template version ICEs since GCC 4.4.0 and with GCC 3.4.0 - 4.0.4. It loops
forever with GCC 4.1.0 - 4.3.6.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/47211] ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
` (4 preceding siblings ...)
2014-02-14 19:44 ` reichelt at gcc dot gnu.org
@ 2021-12-02 8:09 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-02 8:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47211
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #4)
That is PR 65568.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-02 8:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 12:41 [Bug c++/47211] New: ICE: in cp_build_addr_expr_1, at cp/typeck.c:4866 with -fms-extensions zsojka at seznam dot cz
2011-01-07 15:37 ` [Bug c++/47211] " ktietz at gcc dot gnu.org
2011-01-07 15:58 ` zsojka at seznam dot cz
2011-01-07 16:57 ` zsojka at seznam dot cz
2011-01-19 22:00 ` zsojka at seznam dot cz
2014-02-14 19:44 ` reichelt at gcc dot gnu.org
2021-12-02 8:09 ` pinskia at gcc dot gnu.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).