* [match-and-simplify] fix segfault in parser::parse_for
@ 2014-10-29 13:22 Prathamesh Kulkarni
2014-10-29 13:45 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Prathamesh Kulkarni @ 2014-10-29 13:22 UTC (permalink / raw)
To: Richard Biener, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
genmatch segfaults if user-defined operator is not specified.
eg:
(for (oper1 oper2...)
pattern)
* genmatch.c
(parser::parse_for): Call peek instead of peek_ident.
Thanks,
Prathamesh
[-- Attachment #2: foo.patch --]
[-- Type: text/x-patch, Size: 389 bytes --]
Index: genmatch.c
===================================================================
--- genmatch.c (revision 216826)
+++ genmatch.c (working copy)
@@ -2953,8 +2953,8 @@
while (1)
{
- token = peek_ident ();
- if (token == 0)
+ token = peek ();
+ if (token->type != CPP_NAME)
break;
/* Insert the user defined operators into the operator hash. */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [match-and-simplify] fix segfault in parser::parse_for
2014-10-29 13:22 [match-and-simplify] fix segfault in parser::parse_for Prathamesh Kulkarni
@ 2014-10-29 13:45 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2014-10-29 13:45 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: gcc-patches
On Wed, Oct 29, 2014 at 2:01 PM, Prathamesh Kulkarni
<bilbotheelffriend@gmail.com> wrote:
> genmatch segfaults if user-defined operator is not specified.
>
> eg:
> (for (oper1 oper2...)
> pattern)
>
> * genmatch.c
> (parser::parse_for): Call peek instead of peek_ident.
Thanks - applied.
Richard.
> Thanks,
> Prathamesh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-29 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-29 13:22 [match-and-simplify] fix segfault in parser::parse_for Prathamesh Kulkarni
2014-10-29 13:45 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).