From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin von Loewis To: egcs@cygnus.com Subject: TREE_CST_RTL and CONSTRUCTORs Date: Wed, 22 Apr 1998 04:19:00 -0000 Message-id: <199804220837.KAA16445@mira.isdn.cs.tu-berlin.de> X-SW-Source: 1998-04/msg00902.html The macro TREE_CST_RTL accesses the real_cst variant of the tree, so I first required it to be a REAL_CST. Then I found that it is also used to access STRING_CST nodes. This is fine, as both structures start with struct tree_*_cst { char common[sizeof (struct tree_common)]; struct rtx_def *rtl; and the macro accesses rtl. Now, the comment says that it is also used to access CONSTRUCTOR expressions, which has the lay-out struct tree_exp { char common[sizeof (struct tree_common)]; int complexity; So we really have the complexity field here. This problem is exposed in gcc.c-torture/compile/920501-11.c, where output_constant_def is called with a CONSTRUCTOR. What is the story here? Is this intended, and gcc requires sizeof(int) == sizeof(tree)? If so, I should relax the check to also accept constructors in TREE_CST_RTL. If not, gcc should be changed. Regards, Martin