[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

--- Comment #9 from Andrew Pinski  ---
(In reply to Marek Polacek from comment #8)
> Comment 2 testcase fixed with r11-175.

And the accepts invalid is recorded as PR 58661.

[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2020-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #8 from Marek Polacek  ---
Comment 2 testcase fixed with r11-175.

[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2019-06-08 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #7 from Marek Polacek  ---
Still ICEs.  push_inner_scope_r calls itself recursively and never stops:

4073   prev = CP_DECL_CONTEXT (TREE_CODE (inner) == NAMESPACE_DECL ? inner :
TYPE_NAME (inner));
4074   if (outer != prev)
4075 push_inner_scope_r (outer, prev);

[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2013-09-29 Thread arnaut.billings at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

arnaut.billings at yahoo dot com changed:

   What|Removed |Added

 CC||arnaut.billings at yahoo dot 
com

--- Comment #6 from arnaut.billings at yahoo dot com ---
Cygwin gcc (GCC) 4.7.3

Nested class in wrong class with typedef name qualifier also causes a
segmentation fault:

struct Foo
{
  struct Impl;
};

struct Bar
{
  typedef Foo base_type;

  struct base_type::Impl
  {
  };

};

Note: if struct base_type::Impl is changed to struct Foo::Impl then it will
produce an error message.


[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2012-02-02 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-02-02
Summary|internal compiler error:|ICE on definition of nested
   |Segmentation fault (program |class in wrong namespace
   |cc1plus)|scope with wrong
   ||nested-name-qualifier
 Ever Confirmed|0   |1
  Known to fail||4.4.3, 4.5.2, 4.6.2, 4.7.0

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2012-02-02 
10:23:24 UTC ---
Reduced:

namespace N { struct A { struct Inner; }; }
namespace NN { struct AA : N::A {}; struct AA::Inner {}; }


[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2012-02-02 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2012-02-02 
10:25:54 UTC ---
If the nested class is declared in an enclosing namespace scope (as required)
but still with the nested-name-qualifier of the derived type, G++ accepts it:

namespace N { struct A { struct Inner; }; }
namespace NN { struct AA : N::A {}; }
struct NN::AA::Inner {}; 

Clang++ and Comeau both reject this.


[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2012-02-02 Thread dicomj23 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

--- Comment #4 from Dico dicomj23 at gmail dot com 2012-02-02 10:34:41 UTC ---
I agree, but they don't perform a segmentation fault


[Bug c++/52094] ICE on definition of nested class in wrong namespace scope with wrong nested-name-qualifier

2012-02-02 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52094

--- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org 2012-02-02 
10:43:33 UTC ---
Why do you think I confirmed the bug and changed its status to NEW?