This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++ tree inlining bug with dynamic arrays
- To: wilson at cygnus dot com
- Subject: Re: C++ tree inlining bug with dynamic arrays
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 24 Jan 2000 22:18:41 -0800
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200001250606.WAA21270@rtl.cygnus.com>
>>>>> "Jim" == Jim Wilson <wilson@cygnus.com> writes:
Jim> winsup (the cygwin library) fails to compile with the new C++
Jim> inlining on trees code. The problem is that winsup uses
Jim> dynamic arrays.
Yuck. Something about the way we represent dynamic arrays is just not
right -- they seem to yield an inordinate amount of bugs and require
an inordinate amount of extra code. Oh, well.
Jim> it. This patch does seem to work. However, I still get
Jim> failures, and it turns out that at least one more thing needs
Jim> fixing: TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (decl)))
Jim> Also, by looking at the var_decl, I see that TYPE_SIZE
Jim> (TREE_TYPE (decl)) is also wrong, but don't know if this will
Jim> cause a crash.
I think your patch is probably right. And that the additional special
cases you mention are probably right as well. Why did this not cause
a problem with the old inliner? Presumably because nobody ever looked
hard at the SAVE_EXPR for the type, right? In other words, the
inline'd decl was bogus (just as it is now), but nobody cared?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com