This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ tree inlining bug with dynamic arrays


>>>>> "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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]