------- Additional Comments From giovannibajo at libero dot it 2005-01-20 12:09 ------- The problem here is that tsubst does not know about attributes, and we knew this already. So it won't look into DECL_ORIGINAL_TYPE because it assumes it is always NULL for template parameters. You may want to notice that the attribute is in fact ignored:
-------------------------------------------------------- template <typename T> struct BVector { typedef T value_type __attribute__ ((aligned(8))); value_type v; }; BVector<int> m; int main() { printf("%d\n", __alignof__(m.v)); } -------------------------------------------------------- This prints "4" on i686-pc-linux-gnu (if you compile it without -g to avoid the ICE). I tried tsubsting within the ORIGINAL_TYPE of a TYPE_DECL too, and it works in avoiding the ICE, but for nothing else. Also, the long-term solution is to not apply attributes to template types, store the attribute list aside and apply it after substitution. So, after all, this would not be a step forward not even in that direction. Thus, it is better to simply not apply the attribute to template types at all. -- What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |giovannibajo at libero dot |dot org |it Status|NEW |ASSIGNED Last reconfirmed|2005-01-20 04:36:26 |2005-01-20 12:09:35 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19508