* [Bug c++/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
@ 2014-11-29 4:41 ` thiago at kde dot org
2014-11-29 15:02 ` [Bug tree-optimization/64111] " hjl.tools at gmail dot com
` (19 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 4:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #2 from Thiago Macieira <thiago at kde dot org> ---
Created attachment 34137
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34137&action=edit
Preprocessed output for the precompilation header
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
2014-11-29 4:41 ` [Bug c++/64111] [5.0 regression] ICE: conversion of register to a different size thiago at kde dot org
@ 2014-11-29 15:02 ` hjl.tools at gmail dot com
2014-11-29 15:16 ` hjl.tools at gmail dot com
` (18 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 15:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2014-11-29
Ever confirmed|0 |1
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
This testcase is unusable due to
#pragma GCC pch_preprocess "./.pch/Qt5Core.gch/c++"
Please disable PCH and submit a new testcase which can be used to
reproduce ICE.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
2014-11-29 4:41 ` [Bug c++/64111] [5.0 regression] ICE: conversion of register to a different size thiago at kde dot org
2014-11-29 15:02 ` [Bug tree-optimization/64111] " hjl.tools at gmail dot com
@ 2014-11-29 15:16 ` hjl.tools at gmail dot com
2014-11-29 15:20 ` hjl.tools at gmail dot com
` (17 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 15:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Also please exclude AVX512 intrinsic header by hand to reduce the size.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-11-29 15:16 ` hjl.tools at gmail dot com
@ 2014-11-29 15:20 ` hjl.tools at gmail dot com
2014-11-29 15:28 ` hjl.tools at gmail dot com
` (16 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 15:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
Please don't include <x86intrin.h>. If you need some definitions,
copy them by hand to your testcase.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-11-29 15:20 ` hjl.tools at gmail dot com
@ 2014-11-29 15:28 ` hjl.tools at gmail dot com
2014-11-29 18:09 ` thiago at kde dot org
` (15 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 15:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
Also please make sure that your testcase can also be compiled with
GCC 4.9.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2014-11-29 15:28 ` hjl.tools at gmail dot com
@ 2014-11-29 18:09 ` thiago at kde dot org
2014-11-29 18:11 ` thiago at kde dot org
` (14 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 18:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #7 from Thiago Macieira <thiago at kde dot org> ---
Testcase works fine on GCC 4.9 and on this 5.0 without PCH. The error can only
be reproduced with PCH.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2014-11-29 18:09 ` thiago at kde dot org
@ 2014-11-29 18:11 ` thiago at kde dot org
2014-11-29 18:12 ` thiago at kde dot org
` (13 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 18:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
Thiago Macieira <thiago at kde dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34136|0 |1
is obsolete| |
--- Comment #8 from Thiago Macieira <thiago at kde dot org> ---
Created attachment 34141
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34141&action=edit
qresource.ii - preprocessed source, has #pragma preprocess
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2014-11-29 18:11 ` thiago at kde dot org
@ 2014-11-29 18:12 ` thiago at kde dot org
2014-11-29 18:16 ` thiago at kde dot org
` (12 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
Thiago Macieira <thiago at kde dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34137|0 |1
is obsolete| |
--- Comment #9 from Thiago Macieira <thiago at kde dot org> ---
Created attachment 34142
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34142&action=edit
qt_pch.ii - precompilation preprocessed source (without intrinsics)
The preprocessed header was compiled with:
g++ -save-temps -pipe -pipe -march=core-avx2 -mno-rtm -mno-hle -std=c++0x
-pthread -O3 -g -maccumulate-outgoing-args -O3 -fvisibility=hidden
-fvisibility-inlines-hidden -std=c++0x -flto -ffat-lto-objects -Wall -W -Werror
-Wno-error=cpp -Wno-error=deprecated-declarations -Wno-error=strict-overflow
-D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT
-DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT
-DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050000
-DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\" -DQT_USE_ICU -DQT_CORE_LIB
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG
-I/home/thiago/src/qt/qt5/qtbase/mkspecs/linux-g++-optimised
-I/home/thiago/src/qt/qt5/qtbase/src/corelib -I../../include
-I../../include/QtCore -I../../include/QtCore/5.4.0
-I../../include/QtCore/5.4.0/QtCore -Iglobal
-I/home/thiago/src/qt/qt5/qtbase/src/3rdparty/harfbuzz/src
-I/home/thiago/src/qt/qt5/qtbase/src/3rdparty/md5
-I/home/thiago/src/qt/qt5/qtbase/src/3rdparty/md4
-I/home/thiago/src/qt/qt5/qtbase/src/3rdparty/sha3
-I/home/thiago/src/qt/qt5/qtbase/src/3rdparty/forkfd -isystem
/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I.moc -I. -x c++-header -c
/home/thiago/src/qt/qt5/qtbase/src/corelib/global/qt_pch.h -o
.pch/Qt5Core.gch/c++
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2014-11-29 18:12 ` thiago at kde dot org
@ 2014-11-29 18:16 ` thiago at kde dot org
2014-11-29 18:43 ` hjl.tools at gmail dot com
` (11 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 18:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #10 from Thiago Macieira <thiago at kde dot org> ---
Actually, I removed my own #includes for the intrinsics, but they are still
there because of libstdc++-v3/config/cpu/i486/opt/bits/opt_random.h
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2014-11-29 18:16 ` thiago at kde dot org
@ 2014-11-29 18:43 ` hjl.tools at gmail dot com
2014-11-29 20:57 ` thiago at kde dot org
` (10 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 18:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Thiago Macieira from comment #7)
> Testcase works fine on GCC 4.9 and on this 5.0 without PCH. The error can
> only be reproduced with PCH.
You need to provide a tarball which contains a script or Makefile
so that it passes with GCC 4.9 and fails with GCC 5. I had a
very hard time to reproduce it.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2014-11-29 18:43 ` hjl.tools at gmail dot com
@ 2014-11-29 20:57 ` thiago at kde dot org
2014-11-29 21:13 ` hjl.tools at gmail dot com
` (9 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-29 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
Thiago Macieira <thiago at kde dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #34141|0 |1
is obsolete| |
Attachment #34142|0 |1
is obsolete| |
--- Comment #12 from Thiago Macieira <thiago at kde dot org> ---
Created attachment 34143
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34143&action=edit
Testcase with preprocessed source and Makefiles
Here you go.
I've included two sets of preprocessed sources, as the libstdc++ headers are
different in each GCC version.
However, the error happens with GCC 5 on both sets of preprocessed sources. The
GCC 5 preprocessed output is for reference only.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2014-11-29 20:57 ` thiago at kde dot org
@ 2014-11-29 21:13 ` hjl.tools at gmail dot com
2014-11-29 21:15 ` hjl.tools at gmail dot com
` (8 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 21:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Thiago Macieira from comment #12)
> Created attachment 34143 [details]
> Testcase with preprocessed source and Makefiles
>
> Here you go.
>
> I've included two sets of preprocessed sources, as the libstdc++ headers are
> different in each GCC version.
>
> However, the error happens with GCC 5 on both sets of preprocessed sources.
> The GCC 5 preprocessed output is for reference only.
This testcase isn't very useful since it includes pre-processed GCC
intrinsic headers which are specific to a particular commit. You have
to use the GCC built from the same commit to compile it. That is why you
needed 2 sets of header files and it means 2 inputs are DIFFERENT.
Please provide a testcase which can be compiled with both GCC 4.9
and GCC 5. You have to modify your testcase in such a way that those GCC
intrinsic headers are included with
#include <x86intrin.h>
instead of "g++ -E".
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2014-11-29 21:13 ` hjl.tools at gmail dot com
@ 2014-11-29 21:15 ` hjl.tools at gmail dot com
2014-11-30 17:26 ` thiago at kde dot org
` (7 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-29 21:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #13)
> (In reply to Thiago Macieira from comment #12)
> > Created attachment 34143 [details]
> > Testcase with preprocessed source and Makefiles
> >
> > Here you go.
> >
> > I've included two sets of preprocessed sources, as the libstdc++ headers are
> > different in each GCC version.
Another thing, GCC 4.9 may not be able to compile libstdc++ header files
from GCC 5. You may need to use
#include <xxx>
to include libstdc++ header files if it is the case.
> > However, the error happens with GCC 5 on both sets of preprocessed sources.
> > The GCC 5 preprocessed output is for reference only.
>
> This testcase isn't very useful since it includes pre-processed GCC
> intrinsic headers which are specific to a particular commit. You have
> to use the GCC built from the same commit to compile it. That is why you
> needed 2 sets of header files and it means 2 inputs are DIFFERENT.
> Please provide a testcase which can be compiled with both GCC 4.9
> and GCC 5. You have to modify your testcase in such a way that those GCC
> intrinsic headers are included with
>
> #include <x86intrin.h>
>
> instead of "g++ -E".
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (12 preceding siblings ...)
2014-11-29 21:15 ` hjl.tools at gmail dot com
@ 2014-11-30 17:26 ` thiago at kde dot org
2014-11-30 17:48 ` hjl.tools at gmail dot com
` (6 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: thiago at kde dot org @ 2014-11-30 17:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #15 from Thiago Macieira <thiago at kde dot org> ---
Created attachment 34149
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34149&action=edit
Reduced testcase to minimum
This is the same testcase, now reduced to the minimum possible by creduce.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (13 preceding siblings ...)
2014-11-30 17:26 ` thiago at kde dot org
@ 2014-11-30 17:48 ` hjl.tools at gmail dot com
2014-12-01 10:22 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: hjl.tools at gmail dot com @ 2014-11-30 17:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
The small testcase failed with GCC 4.8:
Testing /export/project/git/gcc-regression/master/190324/usr/bin/gcc:
rm -f *.o *.out
g++ -march=core-avx2 -O3 -fvisibility=hidden -x c++-header -c "qt_pch.ii" -o
pch.out
g++ -c -include .pch/Qt5Core -march=core-avx2 -O3 -fvisibility=hidden -o
"file.o" "file.ii"
file.ii: In member function \u2018int A::m_fn1()\u2019:
file.ii:10:5: error: conversion of register to a different size
int A::m_fn1() {
^
VIEW_CONVERT_EXPR<vector(4) long long int>(vect_var_.23_79);
vect_.27_83 = VIEW_CONVERT_EXPR<vector(4) long long int>(vect_var_.23_79);
file.ii:10:5: error: conversion of register to a different size
VIEW_CONVERT_EXPR<vector(4) long long int>(vect_var_.24_81);
vect_.28_85 = VIEW_CONVERT_EXPR<vector(4) long long int>(vect_var_.24_81);
file.ii:10:5: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [file.o] Error 1
Search ended: Fails from the first revision 190324.
Can not make sure it is a regression from that version.
[hjl@gnu-mic-2 gcc-regression]$
/export/project/git/gcc-regression/master/190324/usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/export/project/git/gcc-regression/master/190324/usr/bin/gcc
COLLECT_LTO_WRAPPER=/export/project/git/gcc-regression/master/190324/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../../../gcc/configure
--prefix=/export/project/git/gcc-regression/master/190324/usr
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
MAKEINFO=/usr/bin/false --enable-languages=c,c++,fortran --disable-bootstrap
Thread model: posix
gcc version 4.8.0 20120812 (experimental) [trunk revision 190324] (GCC)
[hjl@gnu-mic-2 gcc-regression]$
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug tree-optimization/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (14 preceding siblings ...)
2014-11-30 17:48 ` hjl.tools at gmail dot com
@ 2014-12-01 10:22 ` rguenth at gcc dot gnu.org
2014-12-01 10:30 ` [Bug middle-end/64111] " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-01 10:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |5.0
--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
<view_convert_expr 0x7ffff6836660
type <vector_type 0x10001e8608
type <integer_type 0x10001dedc8 long long int DI
size <integer_cst 0x100000eb00 constant 64>
unit size <integer_cst 0x100000eb20 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x10001dedc8
precision 64 min <integer_cst 0x1000010b40 -9223372036854775808> max
<integer_cst 0x1000010b60 9223372036854775807>
pointer_to_this <pointer_type 0x10001e5a10>>
V4DI
size <integer_cst 0x1000010d40 constant 256>
unit size <integer_cst 0x1000010d80 constant 32>
align 256 symtab 0 alias set -1 canonical type 0x10001e86b0 nunits 4
pointer_to_this <pointer_type 0x10001e8758>>
arg 0 <ssa_name 0x7ffff68830d8
type <vector_type 0x7ffff686a000 type <integer_type 0x10001ded20 long
unsigned int>
unsigned V4DI
size <integer_cst 0x7ffff6851de0 constant 256> unit size
<integer_cst 0x1000010d80 32>
align 256 symtab 0 alias set 6 canonical type 0x7ffff686a000 nunits
4
pointer_to_this <pointer_type 0x7ffff6870690>>
var <var_decl 0x7ffff68825f0 vect_var_.22>def_stmt vect_var_.22_70 =
MEM[(struct QAbstractAnimationTimer * const &)vect_ppretmp.18_68];
version 70>>
It looks like PCH causes integer constant sharing to break down.
(gdb) p debug_tree ((tree)0x7ffff6851de0)
<integer_cst 0x7ffff6851de0 type <integer_type 0x10001de690 bitsizetype>
constant 256>
$2 = void
(gdb) p debug_tree ((tree)0x1000010d40)
<integer_cst 0x1000010d40 type <integer_type 0x10001de690 bitsizetype>
constant 256>
the constant is above the integer share limit thus it only gets shared
via the int_cst_hash_table hashtable which is collectible:
static GTY ((if_marked ("ggc_marked_p"), param_is (union tree_node)))
htab_t int_cst_hash_table;
but we are supposed to save that into the PCH file and restore it.
tree-cfg.c relies on this:
else if (TREE_CODE (op) == SSA_NAME
&& TYPE_SIZE (TREE_TYPE (expr)) != TYPE_SIZE (TREE_TYPE
(op)))
{
error ("conversion of register to a different size");
though from a quick grep it doesn't seem to be the only one doing so:
fold-const.c: return ((TYPE_SIZE (TREE_TYPE (arg0)) == TYPE_SIZE (TREE_TYPE
(arg1))
tree-inline.c: gcc_checking_assert (TYPE_SIZE (type) == TYPE_SIZE
(TYPE_MAIN_VARIANT (type)));
tree-inline.c: gcc_checking_assert (TYPE_SIZE_UNIT (type) ==
TYPE_SIZE_UNIT (TYPE_MAIN_VARIANT (type)));
tree-inline.c: || TYPE_SIZE (TREE_TYPE (p)) == TYPE_SIZE (TREE_TYPE
(value)))
tree-inline.c: else if (TYPE_SIZE (req_type) == TYPE_SIZE
(TREE_TYPE (replace_info->new_tree)))
Ah, the issue might be that we have (on the 4.8 branch):
/* Return the hash code code X, an INTEGER_CST. */
static hashval_t
int_cst_hash_hash (const void *x)
{
const_tree const t = (const_tree) x;
return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
^ htab_hash_pointer (TREE_TYPE (t)));
}
thus we hash in the pointer value ... (oops). Similar on trunk:
/* Return the hash code code X, an INTEGER_CST. */
hashval_t
int_cst_hasher::hash (tree x)
{
const_tree const t = x;
hashval_t code = htab_hash_pointer (TREE_TYPE (t));
int i;
for (i = 0; i < TREE_INT_CST_NUNITS (t); i++)
code ^= TREE_INT_CST_ELT (t, i);
return code;
}
I'm quite sure that doesn't survive pointer-swizzling with PCH.
I suggest to use a better hash than a simple XOR and rather than hashing
in TREE_TYPE hash in TYPE_UID.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (15 preceding siblings ...)
2014-12-01 10:22 ` rguenth at gcc dot gnu.org
@ 2014-12-01 10:30 ` rguenth at gcc dot gnu.org
2014-12-01 13:43 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-01 10:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> ---
I've posted a patch for trunk. The following patch for the 4.8 branch fixes
the testcase:
Index: gcc/tree.c
===================================================================
--- gcc/tree.c (revision 218016)
+++ gcc/tree.c (working copy)
@@ -1130,7 +1130,7 @@ int_cst_hash_hash (const void *x)
const_tree const t = (const_tree) x;
return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
- ^ htab_hash_pointer (TREE_TYPE (t)));
+ ^ TYPE_UID (TREE_TYPE (t)));
}
/* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (16 preceding siblings ...)
2014-12-01 10:30 ` [Bug middle-end/64111] " rguenth at gcc dot gnu.org
@ 2014-12-01 13:43 ` rguenth at gcc dot gnu.org
2014-12-01 13:47 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-01 13:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Dec 1 13:42:45 2014
New Revision: 218212
URL: https://gcc.gnu.org/viewcvs?rev=218212&root=gcc&view=rev
Log:
2014-12-01 Richard Biener <rguenther@suse.de>
PR middle-end/64111
* tree.c (int_cst_hasher::hash): Use TYPE_UID instead of
htab_hash_pointer to not break PCH.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (17 preceding siblings ...)
2014-12-01 13:43 ` rguenth at gcc dot gnu.org
@ 2014-12-01 13:47 ` rguenth at gcc dot gnu.org
2014-12-01 13:48 ` rguenth at gcc dot gnu.org
2014-12-02 8:52 ` rguenth at gcc dot gnu.org
20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-01 13:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Dec 1 13:47:11 2014
New Revision: 218213
URL: https://gcc.gnu.org/viewcvs?rev=218213&root=gcc&view=rev
Log:
2014-12-01 Richard Biener <rguenther@suse.de>
PR middle-end/64111
* tree.c (int_cst_hash_hash): Use TYPE_UID instead of
htab_hash_pointer to not break PCH.
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/tree.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (18 preceding siblings ...)
2014-12-01 13:47 ` rguenth at gcc dot gnu.org
@ 2014-12-01 13:48 ` rguenth at gcc dot gnu.org
2014-12-02 8:52 ` rguenth at gcc dot gnu.org
20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-01 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Dec 1 13:48:21 2014
New Revision: 218214
URL: https://gcc.gnu.org/viewcvs?rev=218214&root=gcc&view=rev
Log:
2014-12-01 Richard Biener <rguenther@suse.de>
PR middle-end/64111
* tree.c (int_cst_hash_hash): Use TYPE_UID instead of
htab_hash_pointer to not break PCH.
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/tree.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug middle-end/64111] [5.0 regression] ICE: conversion of register to a different size
[not found] <bug-64111-4@http.gcc.gnu.org/bugzilla/>
` (19 preceding siblings ...)
2014-12-01 13:48 ` rguenth at gcc dot gnu.org
@ 2014-12-02 8:52 ` rguenth at gcc dot gnu.org
20 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-02 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64111
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed everywhere.
^ permalink raw reply [flat|nested] 21+ messages in thread