The following code makes the compiler to consume infinite stack memory during
compilation. Obviously the code is invalid.

struct a {
    a() {}
    a std::b;
};

This problem does occur with any gcc 4.0.2 or later, not with gcc 3.3.5 or
older. I have not checked versions in between.

std can be replaced with any other namespace known to the compiler to reproduce
the problem.


-- 
           Summary: ICE when declaring recursive member in std namespace
                    (illegal code)
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rschiele at uni-mannheim dot de
 GCC build triplet: *-*-linux
  GCC host triplet: *-*-linux
GCC target triplet: *-*-linux


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

Reply via email to