public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
@ 2004-02-02 0:21 ma1flfs at bath dot ac dot uk
2004-02-02 0:25 ` [Bug c++/13971] " ma1flfs at bath dot ac dot uk
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: ma1flfs at bath dot ac dot uk @ 2004-02-02 0:21 UTC (permalink / raw)
To: gcc-bugs
Compiling koffice cvs with gcc 3.4.0 20040201 will fail in
filters/kword/pdf/FilterPage.cpp on line 316.
(I will attach the FilterPage.ii file.)
FilterPage.cpp: In member function `void
PDFImport::Page::fillParagraph(PDFImport::Paragraph&, double&) const':
FilterPage.cpp:316: internal compiler error: in build_conditional_expr, at
cp/call.c:3068
Full command line is:
g++ -v -save-temps -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../../lib/kofficeui
-I../../../lib/kofficeui -I../../../lib/kofficecore -I../../../lib/kofficecore
-I../../../lib/store -I../../../lib/store -I../../../lib/kwmf
-I../../../lib/kwmf -I. -I./xpdf/goo -I./xpdf/xpdf -I/opt/kde3/include
-I/opt/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT
-Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith
-Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align
-Wconversion -Wchar-subscripts -DNDEBUG -DNO_DEBUG -O2 -O2 -march=pentium4
-Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new
-fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
-DQT_NO_TRANSLATION -MT FilterPage.lo -MD -MP -MF ".deps/FilterPage.Tpo" -c
-o FilterPage.lo `test -f 'FilterPage.cpp' || echo './'`FilterPage.cpp;
Full compiler output:
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: ../gcc/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocalue=gnu
--enable-languages=
c,c++ --with-cpu=pentium4 --with-arch=pentium4 --with-tune=pentium4
--disable-nls --with-system-zlib
Thread model: posix
gcc version 3.4.0 20040201 (prerelease)
/usr/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -E -quiet -v -I. -I.
-I../../.. -I../../../lib/kofficeui -I../../../lib/kofficeui -I../../../lib/kof
ficecore -I../../../lib/kofficecore -I../../../lib/store -I../../../lib/store
-I../../../lib/kwmf -I../../../lib/kwmf -I. -I./xpdf/goo -I./xpdf/xpdf -
I/opt/kde3/include -I/opt/qt/include -I/usr/X11R6/include -MD FilterPage.d
-MF .deps/FilterPage.Tpo -MP -MT FilterPage.lo -MQ FilterPage.lo -D_GNU_SOU
RCE -DHAVE_CONFIG_H -DQT_THREAD_SUPPORT -D_REENTRANT -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -DNDEBUG -DNO_DEBUG -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQ
T_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION FilterPage.cpp -march=pentium4
-ansi -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -W
write-strings -Wcast-align -Wconversion -Wchar-subscripts -Wformat-security
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -O2
-O2 -o FilterPage.ii
ignoring nonexistent directory
"/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include"
ignoring duplicate directory "."
ignoring duplicate directory "../../../lib/kofficeui"
ignoring duplicate directory "../../../lib/kofficecore"
ignoring duplicate directory "../../../lib/store"
ignoring duplicate directory "../../../lib/kwmf"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here:
.
../../..
../../../lib/kofficeui
../../../lib/kofficecore
../../../lib/store
../../../lib/kwmf
./xpdf/goo
./xpdf/xpdf
/opt/kde3/include
/opt/qt/include
/usr/X11R6/include
/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0
/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/i686-pc-linux-gnu
/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/backward
/usr/local/include
/usr/lib/gcc/i686-pc-linux-gnu/3.4.0/include
/usr/include
End of search list.
/usr/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -fpreprocessed FilterPage.ii
-quiet -dumpbase FilterPage.cpp -march=pentium4 -ansi -auxbase-strip Fi
lterPage.lo -O2 -O2 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W
-Wpointer-arith -Wwrite-strings -Wcast-align -Wconversion -Wchar-subscripts -Wf
ormat-security -Wmissing-format-attribute -ansi -version -fno-exceptions
-fno-check-new -fno-common -o FilterPage.s
GNU C++ version 3.4.0 20040201 (prerelease) (i686-pc-linux-gnu)
compiled by GNU C version 3.4.0 20040201 (prerelease).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
FilterPage.cpp: In member function `void
PDFImport::Page::fillParagraph(PDFImport::Paragraph&, double&) const':
FilterPage.cpp:316: internal compiler error: in build_conditional_expr, at
cp/call.c:3068
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE when compiling koffice-cvs (in
build_conditional_expr, at cp/call.c:3068)
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ma1flfs at bath dot ac dot uk
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
@ 2004-02-02 0:25 ` ma1flfs at bath dot ac dot uk
2004-02-02 4:31 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ma1flfs at bath dot ac dot uk @ 2004-02-02 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ma1flfs at bath dot ac dot uk 2004-02-02 00:25 -------
Created an attachment (id=5640)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5640&action=view)
The file causing the ICE
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
2004-02-02 0:25 ` [Bug c++/13971] " ma1flfs at bath dot ac dot uk
@ 2004-02-02 4:31 ` pinskia at gcc dot gnu dot org
2004-02-02 7:42 ` [Bug c++/13971] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02 4:31 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
Known to fail| |3.5.0
Known to work| |3.3.1
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
2004-02-02 0:25 ` [Bug c++/13971] " ma1flfs at bath dot ac dot uk
2004-02-02 4:31 ` pinskia at gcc dot gnu dot org
@ 2004-02-02 7:42 ` pinskia at gcc dot gnu dot org
2004-02-02 14:04 ` falk at debian dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02 7:42 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE when compiling koffice- |[3.4/3.5 Regression] ICE
|cvs (in |when compiling koffice-cvs
|build_conditional_expr, at |(in build_conditional_expr,
|cp/call.c:3068) |at cp/call.c:3068)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (2 preceding siblings ...)
2004-02-02 7:42 ` [Bug c++/13971] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-02-02 14:04 ` falk at debian dot org
2004-02-02 17:51 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: falk at debian dot org @ 2004-02-02 14:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2004-02-02 14:04 -------
Confirmed. Test case:
struct QChar {
static const QChar null;
};
struct QCharRef {
operator QChar() const;
};
struct QString {
QCharRef operator[](int i);
};
QChar fillParagraph(QString s, int psi) {
return psi ? QChar::null : s[psi];
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (3 preceding siblings ...)
2004-02-02 14:04 ` falk at debian dot org
@ 2004-02-02 17:51 ` pinskia at gcc dot gnu dot org
2004-02-02 17:54 ` giovannibajo at libero dot it
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-02 17:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-02 17:50 -------
Here is the debuging session I did to look into this problem:
Breakpoint 1, 0x9002c878 in exit ()
(gdb) bt
#0 0x9002c878 in exit ()
#1 0x000d7184 in internal_error (msgid=0x1 <Address 0x1 out of bounds>) at /Users/pinskia/
src/gcc-checkin/src/gcc/diagnostic.c:538
#2 0x000d7184 in internal_error (msgid=0x1 <Address 0x1 out of bounds>) at /Users/pinskia/
src/gcc-checkin/src/gcc/diagnostic.c:538
#3 0x000d71c4 in fancy_abort (file=0x1 <Address 0x1 out of bounds>, line=-1073744736,
function=0x476d44 "build_conditional_expr") at /Users/pinskia/src/gcc-checkin/src/gcc/
diagnostic.c:584
#4 0x0000b4f0 in build_conditional_expr (arg1=0x4da4e0, arg2=0x40e91180,
arg3=0x40cd25e0) at /Users/pinskia/src/gcc-checkin/src/gcc/cp/call.c:3068
#5 0x00065590 in build_x_conditional_expr (ifexp=0x4da4e0, op1=0x40e91180,
op2=0x40e91100) at /Users/pinskia/src/gcc-checkin/src/gcc/cp/typeck.c:4330
#6 0x0005535c in cp_parser_expression (parser=0x4da4e0) at /Users/pinskia/src/gcc-checkin/
src/gcc/cp/parser.c:5263
#7 0x0005a31c in cp_parser_statement (parser=0x4da4e0, in_statement_expr_p=1087186400) at
/Users/pinskia/src/gcc-checkin/src/gcc/cp/parser.c:6027
#8 0x0005a3b8 in cp_parser_compound_statement (parser=0x4da4e0,
in_statement_expr_p=1089016064) at /Users/pinskia/src/gcc-checkin/src/gcc/cp/parser.c:5614
#9 0x0005e698 in cp_parser_ctor_initializer_opt_and_function_body (parser=0x4da4e0) at /
Users/pinskia/src/gcc-checkin/src/gcc/cp/parser.c:11227
#10 0x0005e9ac in cp_parser_function_definition_after_declarator (parser=0x40e8ed80,
inline_p=false) at /Users/pinskia/src/gcc-checkin/src/gcc/cp/parser.c:14066
#11 0x0005ee50 in cp_parser_init_declarator (parser=0x40e8ed80, decl_specifiers=0x0,
prefix_attributes=0x0, function_definition_allowed_p=true, member_p=true,
declares_class_or_enum=1, function_definition_p=0x0) at /Users/pinskia/src/gcc-checkin/src/
gcc/cp/parser.c:14011
#12 0x0005943c in cp_parser_simple_declaration (parser=0x1,
function_definition_allowed_p=1089006976) at /Users/pinskia/src/gcc-checkin/src/gcc/cp/
parser.c:6437
#13 0x0005962c in cp_parser_block_declaration (parser=0x40e8ed80, statement_p=true) at /
Users/pinskia/src/gcc-checkin/src/gcc/cp/parser.c:6353
#14 0x0005f93c in cp_parser_declaration (parser=0x40e8ed80) at /Users/pinskia/src/gcc-
checkin/src/gcc/cp/parser.c:6273
#15 0x0005fc54 in cp_parser_declaration_seq_opt (parser=0x40e8ed80) at /Users/pinskia/src/
gcc-checkin/src/gcc/cp/parser.c:6182
#16 0x0005fe34 in c_parse_file () at /Users/pinskia/src/gcc-checkin/src/gcc/cp/parser.c:2307
#17 0x000bc494 in c_common_parse_file (set_yydebug=1) at /Users/pinskia/src/gcc-checkin/src/
gcc/c-opts.c:1216
#18 0x000f6748 in toplev_main (argc=0, argv=0x48fce4) at /Users/pinskia/src/gcc-checkin/src/
gcc/toplev.c:1812
#19 0x000020d4 in _start (argc=2, argv=0xbffffc78, envp=0xbffffc84) at /SourceCache/Csu/Csu
-46/crt.c:267
#20 0x00001f48 in start ()
(gdb) up 4
#4 0x0000b4f0 in build_conditional_expr (arg1=0x4da4e0, arg2=0x40e91180,
arg3=0x40cd25e0) at /Users/pinskia/src/gcc-checkin/src/gcc/cp/call.c:3068
warning: Source file is more recent than executable.
3068 abort ();
(gdb) l
3063 {
3064 arg3 = convert_like (conv3, arg3);
3065 arg3 = convert_from_reference (arg3);
3066 if (!same_type_p (TREE_TYPE (arg3), arg2_type)
3067 && CLASS_TYPE_P (arg2_type))
3068 abort ();
3069 arg3_type = TREE_TYPE (arg3);
3070 }
3071 }
3072
(gdb) p debug_tree(arg3)
<target_expr 0x40cd25e0
type <record_type 0x40e8ee00 QChar type_1 type_5 QI
size <integer_cst 0x40cbeb80 constant 8>
unit size <integer_cst 0x40cbea00 constant 1>
align 8 symtab 0 alias set -1
fields <var_decl 0x40e91180 null type <record_type 0x40e91100 QChar>
readonly used public static external nonlocal decl_3 decl_6 QI file pr13971.cc line 2 size
<integer_cst 0x40cbeb80 8> unit size <integer_cst 0x40cbea00 1>
align 8 context <record_type 0x40e8ee00 QChar>
chain <type_decl 0x40e91080 QChar>>
X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown
member-functions <tree_vec 0x40cbf2d0
elt 0 <overload 0x40e894e0>
elt 2 <function_decl 0x40e91b00 operator=>
elt 3 <overload 0x40e89520>
elt 4 <overload 0x40e89500>>
pointer_to_this <pointer_type 0x40e8ef00> reference_to_this <reference_type 0x40e91880>
chain <type_decl 0x40e8ef80 QChar>>
side-effects addressable
arg 0 <var_decl 0x4db600 type <record_type 0x40e8ee00 QChar>
addressable QI file pr13971.cc line 12 size <integer_cst 0x40cbeb80 8> unit size
<integer_cst 0x40cbea00 1>
align 8 context <function_decl 0x4db000 fillParagraph>>
arg 1 <call_expr 0x4da8d0 type <record_type 0x40e8ee00 QChar>
side-effects
arg 0 <addr_expr 0x4da8b8 type <pointer_type 0x4db500>
constant arg 0 <function_decl 0x40e92600 operator 1>>
arg 1 <tree_list 0x4da888
value <nop_expr 0x4da870 type <pointer_type 0x40e92300>
side-effects
arg 0 <nop_expr 0x4da858 type <pointer_type 0x40e92300>
side-effects
arg 0 <addr_expr 0x4da780 type <pointer_type 0x40e92300>
side-effects
arg 0 <target_expr 0x40cd2560 type <record_type 0x40e92200 QCharRef>
side-effects addressable arg 0 <var_decl 0x4db400> arg 1 <call_expr
0x4da480>>>>>>>>
$1 = void
(gdb) p debug_tree(arg2_type)
<record_type 0x40e91100 QChar readonly type_1 type_5 QI
size <integer_cst 0x40cbeb80 type <integer_type 0x40ccc080 bit_size_type> constant 8>
unit size <integer_cst 0x40cbea00 type <integer_type 0x40ccc000 long unsigned int> constant
1>
align 8 symtab 0 alias set -1
fields <var_decl 0x40e91180 null type <record_type 0x40e91100 QChar>
readonly used public static external nonlocal decl_3 decl_6 QI file pr13971.cc line 2 size
<integer_cst 0x40cbeb80 8> unit size <integer_cst 0x40cbea00 1>
align 8 context <record_type 0x40e8ee00 QChar>
chain <type_decl 0x40e91080 QChar type <record_type 0x40e8ee00 QChar>
nonlocal decl_4 VOID file pr13971.cc line 1
align 1 context <record_type 0x40e8ee00 QChar>
>>
X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown
member-functions <tree_vec 0x40cbf2d0
elt 0 <overload 0x40e894e0>
elt 2 <function_decl 0x40e91b00 operator=>
elt 3 <overload 0x40e89520>
elt 4 <overload 0x40e89500>>
pointer_to_this <pointer_type 0x4db480> reference_to_this <reference_type 0x40e91500>>
$2 = void
By the looks of this, it looks like there are two different structs called QChar for some reason.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (4 preceding siblings ...)
2004-02-02 17:51 ` pinskia at gcc dot gnu dot org
@ 2004-02-02 17:54 ` giovannibajo at libero dot it
2004-02-04 2:32 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-02 17:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-02 17:53 -------
What does the regression hunt script say on this?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |giovannibajo at libero dot
| |it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (5 preceding siblings ...)
2004-02-02 17:54 ` giovannibajo at libero dot it
@ 2004-02-04 2:32 ` pinskia at gcc dot gnu dot org
2004-02-15 22:42 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-04 2:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-04 02:32 -------
>From Phil's regression hunter: Search converges between 2003-05-05-trunk (#287) and 2003-05-06-
trunk (#288).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (6 preceding siblings ...)
2004-02-04 2:32 ` pinskia at gcc dot gnu dot org
@ 2004-02-15 22:42 ` mmitchel at gcc dot gnu dot org
2004-02-16 0:55 ` giovannibajo at libero dot it
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-15 22:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-02-15 22:42 -------
The standard is not clear.
Here, "QChar::null" is an lvalue of type "const QChar". Meanwhile,
"s[psi]" is an rvalue of type "QCharRef".
According to [expr.cond], we try to convert each of the operands to
the type of the other. The applicable language is:
E1 can be converted to match E2 if E1 can be implicitly converted to
the type that expression E2 would have if E2 were converted to an
rvalue (or the type it has, if E2 is an rvalue).
where, here, "E1" is "s[psi]", and "E2" is "QChar::null".
The type that E2 would have if it were an rvalue is "const QChar"
because rvalues of class-type can be cv-qualified. E1 can certainly
be implicitly converted to "const QChar" since:
const QChar t = s[psi];
is valid; the cv-qualification of the left-hand and right-hand sides
is ignored in this context.
We then have:
that conversion is applied to the chosen operand and the converted
operand is used in place of the original operand for the remainder
of this section.
Now, the questions:
- What is the type of this converted operand: "const QChar" or just
"QChar" as returned by the conversion operator?
- What if the "QChar::null" had type "QChar" and the conversion
operator returned "const QChar"?
I think the logic conclusion is that the type of both operands, after
the conversion, should be treated as the union of the cv-qualification
of the two converted operands.
I have asked Steve Adamczyk to open a core issue.
In the meantime, I'll look at implementing the suggested fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (7 preceding siblings ...)
2004-02-15 22:42 ` mmitchel at gcc dot gnu dot org
@ 2004-02-16 0:55 ` giovannibajo at libero dot it
2004-02-16 2:35 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-16 0:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-16 00:55 -------
Mark said he's taking care of this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mmitchel at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (8 preceding siblings ...)
2004-02-16 0:55 ` giovannibajo at libero dot it
@ 2004-02-16 2:35 ` cvs-commit at gcc dot gnu dot org
2004-02-16 3:09 ` cvs-commit at gcc dot gnu dot org
2004-02-16 3:14 ` 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-02-16 2:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-02-16 02:35 -------
Subject: Bug 13971
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-02-16 02:35:50
Modified files:
gcc/cp : ChangeLog call.c class.c decl.c name-lookup.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/expr: cond4.C
gcc/testsuite/g++.dg/lookup: crash2.C
Log message:
PR c++/13971
* call.c (build_conditional_expr): Handle conversions between
class types which result in differently cv-qualified type
variants.
PR c++/14086
* class.c (delete_duplicate_fields_1): Remove.
(delete_duplicate_fields): Likewise.
(finish_struct_anon): Remove check for members with the same name
as their enclosing class.
(check_field_decls): Do not call duplicate_fields.
* decl.c (grokdeclarator): Remove check for static data members
with the same name as their enclosing class.
* name-lookup.c (push_class_level_binding): Check for members with
the same name as their enclosing class.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3957&r2=1.3958
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.462&r2=1.463
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.600&r2=1.601
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1185&r2=1.1186
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.37&r2=1.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3503&r2=1.3504
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/cond4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/crash2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (9 preceding siblings ...)
2004-02-16 2:35 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-16 3:09 ` cvs-commit at gcc dot gnu dot org
2004-02-16 3:14 ` 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-02-16 3:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-02-16 03:09 -------
Subject: Bug 13971
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: mmitchel@gcc.gnu.org 2004-02-16 03:08:55
Modified files:
gcc/cp : ChangeLog call.c class.c decl.c name-lookup.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/expr: cond4.C
gcc/testsuite/g++.dg/lookup: crash2.C
Log message:
PR c++/13971
* call.c (build_conditional_expr): Handle conversions between
class types which result in differently cv-qualified type
variants.
PR c++/14086
* class.c (delete_duplicate_fields_1): Remove.
(delete_duplicate_fields): Likewise.
(finish_struct_anon): Remove check for members with the same name
as their enclosing class.
(check_field_decls): Do not call duplicate_fields.
* decl.c (grokdeclarator): Remove check for static data members
with the same name as their enclosing class.
* name-lookup.c (push_class_level_binding): Check for members with
the same name as their enclosing class.
PR c++/13971
* g++.dg/expr/cond4.C: New test.
PR c++/14086
* g++.dg/lookup/crash2.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.53&r2=1.3892.2.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.7&r2=1.452.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.595.4.4&r2=1.595.4.5
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.8&r2=1.1174.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.34.2.2&r2=1.34.2.3
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.79&r2=1.3389.2.80
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/cond4.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/crash2.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=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/13971] [3.4/3.5 Regression] ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068)
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
` (10 preceding siblings ...)
2004-02-16 3:09 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-16 3:14 ` mmitchel at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-02-16 3:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-02-16 03:14 -------
Fixed in GCC 3.4 and GCC 3.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13971
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-02-16 3:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-02 0:21 [Bug c++/13971] New: ICE when compiling koffice-cvs (in build_conditional_expr, at cp/call.c:3068) ma1flfs at bath dot ac dot uk
2004-02-02 0:25 ` [Bug c++/13971] " ma1flfs at bath dot ac dot uk
2004-02-02 4:31 ` pinskia at gcc dot gnu dot org
2004-02-02 7:42 ` [Bug c++/13971] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-02 14:04 ` falk at debian dot org
2004-02-02 17:51 ` pinskia at gcc dot gnu dot org
2004-02-02 17:54 ` giovannibajo at libero dot it
2004-02-04 2:32 ` pinskia at gcc dot gnu dot org
2004-02-15 22:42 ` mmitchel at gcc dot gnu dot org
2004-02-16 0:55 ` giovannibajo at libero dot it
2004-02-16 2:35 ` cvs-commit at gcc dot gnu dot org
2004-02-16 3:09 ` cvs-commit at gcc dot gnu dot org
2004-02-16 3:14 ` 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).