RE: Invalid tree node causes segfault in diagnostic

2013-10-14 Thread Paulo Matos
> -Original Message- > From: DJ Delorie [mailto:d...@redhat.com] > Sent: 11 October 2013 19:19 > To: Paulo Matos > Cc: richard.guent...@gmail.com; gcc@gcc.gnu.org > Subject: Re: Invalid tree node causes segfault in diagnostic > > > > While I am at it, can

Re: Invalid tree node causes segfault in diagnostic

2013-10-11 Thread DJ Delorie
> While I am at it, can I patch backends as well? For example > mep/mep.c has an occurrence of tree_code_name[TREE_CODE (... The mep change is pre-approved :-)

RE: Invalid tree node causes segfault in diagnostic

2013-10-11 Thread Richard Biener
Paulo Matos wrote: >> -Original Message- >> From: Richard Biener [mailto:richard.guent...@gmail.com] >> Sent: 11 October 2013 13:47 >> To: Paulo Matos >> Cc: gcc@gcc.gnu.org >> Subject: Re: Invalid tree node causes segfault in diagnostic >> >

RE: Invalid tree node causes segfault in diagnostic

2013-10-11 Thread Paulo Matos
> -Original Message- > From: Richard Biener [mailto:richard.guent...@gmail.com] > Sent: 11 October 2013 13:47 > To: Paulo Matos > Cc: gcc@gcc.gnu.org > Subject: Re: Invalid tree node causes segfault in diagnostic > > > Hmm. We have several places acces

Re: Invalid tree node causes segfault in diagnostic

2013-10-11 Thread Richard Biener
On Fri, Oct 11, 2013 at 12:57 PM, Paulo Matos wrote: > Hello, > > I have a testcase that, during parsing, generates an invalid tree. This > invalid tree triggers tree_check_failed, which was expecting a string_cst. > tree_check_failed calls internal_error with tree_code_name[TREE_CODE (node)] >

Invalid tree node causes segfault in diagnostic

2013-10-11 Thread Paulo Matos
Hello, I have a testcase that, during parsing, generates an invalid tree. This invalid tree triggers tree_check_failed, which was expecting a string_cst. tree_check_failed calls internal_error with tree_code_name[TREE_CODE (node)] without checking that TREE_CODE (node) is valid. I attach a patc