public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c/4053 Re: problems debugging gcc Date: Wed, 05 Dec 2001 15:26:00 -0000 [thread overview] Message-ID: <20011205232601.32351.qmail@sources.redhat.com> (raw) The following reply was made to PR c/4053; it has been noted by GNATS. From: Daniel Jacobowitz <drow@mvista.com> To: mike stump <mrs@windriver.com> Cc: neil@daikokuya.demon.co.uk, danishsamad@yahoo.com, gcc-gnats@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: c/4053 Re: problems debugging gcc Date: Wed, 5 Dec 2001 18:17:39 -0500 On Tue, Dec 04, 2001 at 05:02:14PM -0800, mike stump wrote: > > Date: Tue, 4 Dec 2001 16:08:45 -0500 > > From: Daniel Jacobowitz <drow@mvista.com> > > To: Neil Booth <neil@daikokuya.demon.co.uk> > > > For the curious, this is the exact same problem as c/4053. > > > > This happens to me very frequently; I have no idea what causes it. I > > > have a sneaking suspicion that this GCC bug is what the original post > > > was about, though I'm not sure. > > > Well, it isn't in the debug format code; the file information in the > > RTL is wrong. And there's nothing obviously incorrect about the code > > in cb_file_change... > > > Aha, I think I see it. cb_file_change updates input_filename as it > > reads. Compile the testcase from the PR with a breakpoint on > > cb_file_change and a breakpoint on emit_line_note. If I had to guess, > > I'd say that the problem was input_filename describing the state of the > > lexer where it used to describe the state of the parser. In > > c_expand_body is the line: > > init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl)); > > > DECL_SOURCE_LINE is fine. input_filename isn't. > > Ok, since you did all the hard work, test out the below, and let us > know if it works. Could someone else run a dejagnu run on it, then we > can submit it for inclusion. > > 2001-12-04 Mike Stump <mrs@wrs.com> > > * c-decl.c (c_expand_body): Use the name of the file associated > with the fndecl, not the current input filename. > > *** c-decl.c.~1~ Tue Dec 4 16:52:33 2001 > --- c-decl.c Tue Dec 4 16:54:14 2001 > *************** c_expand_body (fndecl, nested_p, can_def > *** 6889,6895 **** > > /* Initialize the RTL code for the function. */ > current_function_decl = fndecl; > ! init_function_start (fndecl, input_filename, DECL_SOURCE_LINE (fndecl)); > > /* This function is being processed in whole-function mode. */ > cfun->x_whole_function_mode_p = 1; > --- 6889,6897 ---- > > /* Initialize the RTL code for the function. */ > current_function_decl = fndecl; > ! init_function_start (fndecl, > ! DECL_SOURCE_FILE (fndecl), > ! DECL_SOURCE_LINE (fndecl)); > > /* This function is being processed in whole-function mode. */ > cfun->x_whole_function_mode_p = 1; > -------------- I don't expect this to have any effect, and Neil seemed to confirm that. Every reference to the input_filename global in the front-end is going to be similarly wrong. See all of c-semantics, for instance. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer
reply other threads:[~2001-12-05 23:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20011205232601.32351.qmail@sources.redhat.com \ --to=drow@mvista.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /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: linkBe 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).