g++ internal compiler error linux-i586 libstdc++-2.90.7
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Sun Mar 12 14:08:00 GMT 2000
> Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
Thanks for your bug report, here is a patch for the mainline
compiler. I have not tested it at all with 2.95, and I have not
regression-tested it with the mainline. It also is a work-around only,
until the middle-end supports complex structures as primitives.
Regards,
Martin
2000-03-12 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* stor-layout.c (layout_type): Do not try to treat a structure
with a single complex field as a primitive value.
// Build don't link:
struct S{
__complex__ double x;
};
void foo(struct S*);
int main()
{
struct S s = {1.0+1i};
foo(&s);
}
Index: stor-layout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stor-layout.c,v
retrieving revision 1.53
diff -u -r1.53 stor-layout.c
--- stor-layout.c 2000/03/07 11:41:19 1.53
+++ stor-layout.c 2000/03/12 21:54:42
@@ -1145,7 +1145,11 @@
#endif /* STRUCT_FORCE_BLK */
}
- if (mode != VOIDmode)
+ /* XXX Support for structures containing a single float
+ member is currently broken: put_var_into_stack expects
+ that the TREE_TYPE of type indicates the complex value
+ base type, which it does not for this structure. */
+ if (mode != VOIDmode && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
/* We only have one real field; use its mode. */
TYPE_MODE (type) = mode;
else
More information about the Gcc-bugs
mailing list