[Bug preprocessor/19411] Simple program causes gcc to run out of memory
amodra at bigpond dot net dot au
gcc-bugzilla@gcc.gnu.org
Mon Feb 7 20:15:00 GMT 2005
------- Additional Comments From amodra at bigpond dot net dot au 2005-02-07 06:58 -------
I wouldn't blame the preprocessor. The macros in altivec.h for C support have
multiple occurences of their arguments. __builtin_choose_expr only evaluates
one occurence, but that doesn't stop the preprocessor *substituting* the macro
args multiple times.
vec_add (a, a) expands to 8006 chars,
vec_add (a, vec_add (a, a)) expands to 321430
vec_add (1, vec_add (a, vec_add (a, a))) expands to 12231542
and I didn't even try four levels.
Perhaps this comment in altivec.h explains it..
/* "... and so I think no man in a century will suffer as greatly as
you will." */
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at redhat dot com
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-07 06:58:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19411
More information about the Gcc-bugs
mailing list