https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88409

Nick Clifton <nickc at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #3 from Nick Clifton <nickc at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #2)

Hi H.J.

> > The attached patch resolves the problem by adding a --no-recurse-limit
> > option to the demangler testser and then using it for the problematic
> > test case.  I felt that this was a better solution than raising the
> > recursion limit, as it means that the limit detecting code will actually
> > be exercised by the testsuite.

> This will cause a regression since this input will fail now.

Umm, sorry ?  The change means that the old behaviour of the demangler
is restored.  Ie the recursion limit is not enforced, and thus the test
will behave exactly as it used to do.

Unless you mean that there would be a problem if the test input (or 
something similar) is ever generated by the compilation of a real-world
program.  In which case I agree, there would be a problem.  But are you
ever going to get a real-world mangled version of:

modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::parser::ExtractParserType<modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
> >::InputType,
modc::parser::MaybeRef<modc::astParser::{lambda(modc::astParser::Loc,
modc::parser::RepeatedParser, modc::Maybe<modc::parser::Parser>&&)#21}>::Type,
modc::parser::RepeatedParser<modc::parser::ParserRef<modc::parser::TransformParser<modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::astParser::TokenParserInput<modc::parser::ParserRef<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> >
><modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser::Annotation::Relationship> >,
modc::parser::ExactElementParser> >,
modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}> >,
false><modc::parser::OptionalParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> > > > >::Type,
modc::parser::RepeatedParser<modc::parser::ParserRef<modc::parser::TransformParser<modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::astParser::TokenParserInput<modc::parser::ParserRef<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> >
><modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser::Annotation::Relationship> >,
modc::parser::ExactElementParser> >,
modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}> >,
false><modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
><modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style> > > >::Type,
modc::parser::RepeatedParser<modc::parser::ParserRef<modc::parser::TransformParser<modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::astParser::TokenParserInput<modc::parser::ParserRef<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> >
><modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser::Annotation::Relationship> >,
modc::parser::ExactElementParser> >,
modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}> >,
false><modc::parser::SequenceParser<modc::astParser::TokenParserInput<modc::parser::ExactElementParser<modc::astParser::TokenParserInput>,
modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
><modc::ast::Expression> > > >::Type,
modc::parser::RepeatedParser<modc::parser::ParserRef<modc::parser::TransformParser<modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::astParser::TokenParserInput<modc::parser::ParserRef<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> >
><modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser::Annotation::Relationship> >,
modc::parser::ExactElementParser> >,
modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}> >,
false><modc::parser::RepeatedParser<modc::parser::ParserRef<modc::parser::TransformParser<modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::astParser::TokenParserInput<modc::parser::ParserRef<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> >
><modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser::Annotation::Relationship> >,
modc::parser::ExactElementParser> >,
modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}> >, false> >::Type>
modc::parser::sequence<modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
>,
modc::parser::OptionalParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> > > >,
modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
><modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style> > >,
modc::parser::SequenceParser<modc::astParser::TokenParserInput<modc::parser::ExactElementParser<modc::astParser::TokenParserInput>,
modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
><modc::ast::Expression> > >,
modc::parser::RepeatedParser<modc::parser::ParserRef<modc::parser::TransformParser<modc::parser::ParserRef<modc::astParser::OneOfKeywordsToTParser<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed type#1}::parenthesized>::Parser::Style>
><modc::astParser::TokenParserInput<modc::parser::ParserRef<modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser<modc::parser::ParserRef<modc::parser::Parser<modc::astParser::TokenParserInput,
modc::ast::Expression> >
><modc::astParser::ListParserTemplate<(modc::tokens::Token::Type)4,
&modc::tokens::{unnamed
type#1}::parenthesized>::Parser::Annotation::Relationship> >,
modc::parser::ExactElementParser> >,
modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}> >, false>
>(modc::astParser::{lambda(modc::astParser::Loc, modc::parser::RepeatedParser,
modc::Maybe<modc::parser::Parser>&&)#21}&&,
(modc::parser::ExtractParserType<modc::astParser::LocatedParser<modc::parser::ParserRef<modc::astParser::{lambda(modc::astParser::TokenParserInput&)#1}>
> >&&)...)

I would have thought that that would be extremely unlikely.  Am I wrong ?

Reply via email to