http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46664
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.11.26 11:23:10
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-26
11:23:10 UTC ---
Confirmed. My gold also complains:
/var.o netcdf/typeSizes.o netcdf/netcdf.o -o wrf
/usr/bin/gold: error: module_physics_init.fppized.o: multiple definition of
'module_ra_gfdleta.eq.0_'
/usr/bin/gold: module_ra_gfdleta.fppized.o: previous definition here
/usr/bin/gold: error: module_physics_init.fppized.o: multiple definition of
'module_ra_gfdleta.eq.1_'
/usr/bin/gold: module_ra_gfdleta.fppized.o: previous definition here
/usr/bin/gold: error: module_physics_init.fppized.o: multiple definition of
'module_ra_gfdleta.eq.2_'
...
In file included from :12:0:
solve_em.fppized.f90: In function 'solve_em':
solve_em.fppized.f90:3:0: internal compiler error: in build2_stat, at
tree.c:3798
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [/tmp/cc4pERit.ltrans2.ltrans.o] Error 1
In the end it is because we have
{
type = <float:32>[0:D.35766] * restrict
offset = 0
elements = {
[0] = D.36037_17957 * 1,
[1] = (lbound.2168_17368 + 1) * stride.2022_17908 * 8,
[2] = stride.2025_17914 * j_18060 * 4,
[3] = offset.2026_17932 * 4,
[4] = lbound.2168_17368 * stride.2022_17908 * -4,
[5] = (j_18060 + -1) * stride.2025_17914 * -4,
[6] = D.36025_17988 * -1,
[7] = i_18065 * 4
}
rest = (<unnamed-unsigned:32>) D.36049_17926
}
and D.36049_17926 is a pointer. Thus, the affine comb is of pointer type
but there is no pointer element.
We are adding
{
type = <float:32>[0:D.35766] * restrict
offset = 0
elements = {
[0] = D.36037_17957 * 1, (void *)
[1] = (lbound.2168_17368 + 1) * stride.2022_17908 * 4, (int)
[2] = stride.2025_17914 * j_18060 * 4, (int)
[3] = offset.2026_17932 * 4 (int)
}
}
and
{
type = <unnamed-unsigned:32>
offset = 0
elements = {
[0] = lbound.2168_17368 * stride.2022_17908 * -1, (int)
[1] = (j_18060 + -1) * stride.2025_17914 * -1, (int)
[2] = D.36025_17988 * -1, (void *)
[3] = i_18065 * 4, (int)
[4] = D.36049_17926 * 1, (void *)
[5] = (lbound.2168_17368 + 1) * stride.2022_17908 * 4 (int)
}
}
Adding D.36049_17926 we add it to ->rest of
{
type = <float:32>[0:D.35766] * restrict
offset = 0
elements = {
[0] = D.36037_17957 * 1,
[1] = (lbound.2168_17368 + 1) * stride.2022_17908 * 4,
[2] = stride.2025_17914 * j_18060 * 4,
[3] = offset.2026_17932 * 4,
[4] = lbound.2168_17368 * stride.2022_17908 * -4,
[5] = (j_18060 + -1) * stride.2025_17914 * -4,
[6] = D.36025_17988 * -1,
[7] = i_18065 * 4
}
}
because we overflow MAX_AFF_ELTS and hit
type = comb->type;
if (POINTER_TYPE_P (type))
type = sizetype;
which means ->rest will be always of sizetype which is inconsistent
with what aff_combination_to_tree does.
It sounds more natural to not start aff_combination_to_tree with
->rest but instead add that last, before adding ->offset. That fixes
the ICE.
Mine.