From bed1412f870e79bad0024305e603703465554c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Fri, 23 Sep 2022 13:14:52 -0400 Subject: [PATCH 1/2] Parser: check that location is trivial --- src/lpython/parser/parser_stype.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lpython/parser/parser_stype.h b/src/lpython/parser/parser_stype.h index bcf3b8b58d..98752c6ccc 100644 --- a/src/lpython/parser/parser_stype.h +++ b/src/lpython/parser/parser_stype.h @@ -101,6 +101,9 @@ static_assert(std::is_trivial::value); // would reduce performance. static_assert(sizeof(YYSTYPE) == sizeof(Vec)); +static_assert(std::is_standard_layout::value); +static_assert(std::is_trivial::value); + } // namespace LFortran From 5bf697b4b20b1f00b2511459f1fbe3598c211938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Fri, 23 Sep 2022 13:25:31 -0400 Subject: [PATCH 2/2] Parser: increase the stack size --- src/lpython/parser/parser_stype.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lpython/parser/parser_stype.h b/src/lpython/parser/parser_stype.h index 98752c6ccc..c4423cd9c1 100644 --- a/src/lpython/parser/parser_stype.h +++ b/src/lpython/parser/parser_stype.h @@ -110,6 +110,7 @@ static_assert(std::is_trivial::value); typedef struct LFortran::Location YYLTYPE; #define YYLTYPE_IS_DECLARED 1 #define YYLTYPE_IS_TRIVIAL 0 +#define YYINITDEPTH 2000 #endif // LPYTHON_PARSER_STYPE_H