Commit 4f06ce1
c++: share more trees representing enumerators
This came up in Reflection where an assert fails because we have two
different trees for same enumerators. The reason is that in
finish_enum_value_list we copy_node when converting the enumerators.
It should be more efficient to share trees for identical enumerators.
This fix was proposed by Jakub.
gcc/cp/ChangeLog:
* decl.cc (finish_enum_value_list): Use fold_convert instead of
copy_node.
Co-authored-by: Jakub Jelinek <jakub@redhat.com>
Reviewed-by: Jason Merrill <jason@redhat.com>1 parent 14f7cfd commit 4f06ce1
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18958 | 18958 | | |
18959 | 18959 | | |
18960 | 18960 | | |
18961 | | - | |
18962 | | - | |
18963 | | - | |
18964 | | - | |
| 18961 | + | |
| 18962 | + | |
18965 | 18963 | | |
18966 | | - | |
18967 | | - | |
18968 | 18964 | | |
18969 | 18965 | | |
18970 | 18966 | | |
| |||
0 commit comments