From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Martin Sebor <msebor@gmail.com>,
Richard Biener <rguenther@suse.de>,
Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)
Date: Thu, 31 May 2018 17:43:00 -0000 [thread overview]
Message-ID: <CADzB+2mBrpy1pmX8CNpXLGeijK1N70r=YARfx7=yMvb_htfeow@mail.gmail.com> (raw)
In-Reply-To: <20180531153129.GA14160@tucnak>
On Thu, May 31, 2018 at 11:31 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, May 31, 2018 at 11:19:08AM -0400, Jason Merrill wrote:
>> > In my mind the issue boils down to two questions:
>> >
>> > 1) should the pretty printer handle error-mark-node gracefully
>> > or is it appropriate for it to abort?
>> > 2) is it appropriate to be embedding/using error_mark_node in
>> > valid constructs as a proxy for "unused" or "unknown" or
>> > such?
>> >
>> > I would expect the answer to (1) to be yes. Despite that,
>> > I agree with Jason that the answer to (2) should be no.
>> >
>> > That said, I don't think the fix for this bug needs to depend
>> > on solving (2). We can avoid the ICE by changing the pretty
>> > printers and adjust the openmp implementation later.
>>
>> The problem with embedded error_mark_node is that lots of places are
>> going to blow up like this, and we don't want to change everything to
>> expect it. Adjusting the pretty-printer might fix this particular
>> testcase, but other things are likely to get tripped up by the same
>> problem.
>>
>> Where is the error_mark_node coming from in the first place?
>
> remap_type invoked during omp-low.c (scan_omp).
> omp_copy_decl returns error_mark_node for decls that tree-inline.c wants
> to remap, but they aren't actually remapped for some reason.
> For normal VLAs gimplify.c makes sure the needed artifical decls are
> firstprivatized, but in this case (VLA not in some decl's type, but just
> referenced indirectly through pointers) nothing scans those unless
> those temporaries are actually used in the code.
Returning error_mark_node from omp_copy_decl and then continuing seems
like the problem, then. Would it really be that hard to return an
uninitialized variable instead?
Jason
next prev parent reply other threads:[~2018-05-31 17:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 20:57 Martin Sebor
2018-05-31 8:19 ` Jakub Jelinek
2018-05-31 13:25 ` Jason Merrill
2018-05-31 13:52 ` Jakub Jelinek
2018-05-31 15:08 ` Martin Sebor
2018-05-31 15:31 ` Jason Merrill
2018-05-31 15:36 ` Jakub Jelinek
2018-05-31 17:43 ` Jason Merrill [this message]
2018-05-31 17:45 ` Jakub Jelinek
2018-06-19 0:07 ` Martin Sebor
2019-01-07 22:42 ` [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956, take 2) Jakub Jelinek
2019-01-11 20:50 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADzB+2mBrpy1pmX8CNpXLGeijK1N70r=YARfx7=yMvb_htfeow@mail.gmail.com' \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=msebor@gmail.com \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).