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]
Other format: [Raw text]

[Bug middle-end/25566] New: Variable length types and inlining


According to the following comment:
      /* We cannot inline a function of the form

           void F (int i) { struct S { int ar[i]; } s; }

         Attempting to do so produces a catch-22.
         If walk_tree examines the TYPE_FIELDS chain of RECORD_TYPE/
         UNION_TYPE nodes, then it goes into infinite recursion on a
         structure containing a pointer to its own type.  If it doesn't,
         then the type node for S doesn't get adjusted properly when
         F is inlined.

         ??? This is likely no longer true, but it's too late in the 4.0
         cycle to try to find out.  This should be checked for 4.1.  */

We don't inline functions with variable length types but we should check this
out for 4.1 (but it is too late even for 4.1).


-- 
           Summary: Variable length types and inlining
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, FIXME
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25566


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