diff options
author | Richard Guenther <rguenther@suse.de> | 2010-05-19 15:57:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-05-19 15:57:17 +0000 |
commit | 817c299606addcce4e2b253a5ed3d462bc54c312 (patch) | |
tree | d57e2f3593ba30034963c7090c0cdf3a446c7ba3 /gcc | |
parent | c04b6b3823c92bd06e1a6b33d1a05003f1760df7 (diff) | |
download | gcc-817c299606addcce4e2b253a5ed3d462bc54c312.zip gcc-817c299606addcce4e2b253a5ed3d462bc54c312.tar.gz gcc-817c299606addcce4e2b253a5ed3d462bc54c312.tar.bz2 |
re PR lto/44196 (lto1: ICE: tree check: expected field_decl, have type_decl in gimple_types_compatible_p, at gimple.c:3597)
2010-05-19 Richard Guenther <rguenther@suse.de>
PR lto/44196
* tree.c (find_decls_types_r): Walk BLOCKs and its vars.
* g++.dg/lto/20100519-1_0.C: New testcase.
From-SVN: r159582
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lto/20100519-1_0.C | 23 | ||||
-rw-r--r-- | gcc/tree.c | 9 |
4 files changed, 42 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ec47a66..5eb9e02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-05-19 Richard Guenther <rguenther@suse.de> + PR lto/44196 + * tree.c (find_decls_types_r): Walk BLOCKs and its vars. + +2010-05-19 Richard Guenther <rguenther@suse.de> + * doc/invoke.texi (-fwhopr): Document new optional jobs argument. * common.opt (fwhopr=): New. * opts.c (common_handle_option): Handle OPT_fwhopr. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 12f4e3c..4de8c08 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-05-19 Richard Guenther <rguenther@suse.de> + + PR lto/44196 + * g++.dg/lto/20100519-1_0.C: New testcase. + 2010-05-19 Daniel Franke <franke.daniel@gmail.com> PR fortran/42360 diff --git a/gcc/testsuite/g++.dg/lto/20100519-1_0.C b/gcc/testsuite/g++.dg/lto/20100519-1_0.C new file mode 100644 index 0000000..bc2ddf1 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/20100519-1_0.C @@ -0,0 +1,23 @@ +// { dg-lto-do link } + +template <typename Ordinal> +struct DirectSerializationTraits +{ + static void fromCountToDirectBytes(const Ordinal count) {} +}; +template<typename Ordinal> class SerializationTraits + : public DirectSerializationTraits<Ordinal> { }; +template <typename Ordinal> +class ConstValueTypeSerializationBuffer +{ +public: + ConstValueTypeSerializationBuffer(const Ordinal count) + { + typedef SerializationTraits<Ordinal> SerT; + SerT::fromCountToDirectBytes(count); + } +}; +int main () +{ + ConstValueTypeSerializationBuffer<int> charSendBuffer(1); +} @@ -4713,6 +4713,15 @@ find_decls_types_r (tree *tp, int *ws, void *data) fld_worklist_push (TREE_CHAIN (t), fld); *ws = 0; } + else if (TREE_CODE (t) == BLOCK) + { + tree tem; + for (tem = BLOCK_VARS (t); tem; tem = TREE_CHAIN (tem)) + fld_worklist_push (tem, fld); + for (tem = BLOCK_SUBBLOCKS (t); tem; tem = BLOCK_CHAIN (tem)) + fld_worklist_push (tem, fld); + fld_worklist_push (BLOCK_ABSTRACT_ORIGIN (t), fld); + } fld_worklist_push (TREE_TYPE (t), fld); |