public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path
@ 2014-03-10 12:51 secondary.mail7865220 at gmail dot com
2014-03-14 12:57 ` [Bug middle-end/60484] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: secondary.mail7865220 at gmail dot com @ 2014-03-10 12:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
Bug ID: 60484
Summary: -fdump-rtl-expand and attribute optimize gives
incorrect dump file path
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: secondary.mail7865220 at gmail dot com
Created attachment 32324
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32324&action=edit
test.c - Source to trigger the bug
To trigger this bug, three conditions must be met:
- At least one function must be annotated with "__attribute__((optimize))".
- The object file is placed in a sub-directory to where the source file is
located.
- The flag -fdump-rtl-expand is used.
The path to the directory where the dump file is supposed to be saved is
prepended the same number of times as there are functions with "attribute
optimize" in the source C file.
Compiler output:
$ gcc -std=c99 -fdump-rtl-expand -o objs/test.o -c test.c
test.c: In function ‘Optimized_1’:
test.c:3:1: error: could not open dump file
‘objs/objs/objs/test.c.166r.expand’: No such file or directory
Optimized_1(int arg)
^
test.c: In function ‘Optimized_2’:
test.c:10:1: error: could not open dump file
‘objs/objs/objs/test.c.166r.expand’: No such file or directory
Optimized_2(int arg)
^
test.c: In function ‘main’:
test.c:15:5: error: could not open dump file
‘objs/objs/objs/test.c.166r.expand’: No such file or directory
int main()
^
Compiler version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 4.8.2 (GCC)
System type:
$ uname -a
Linux jf-linux 3.4.63-2.44-desktop #1 SMP PREEMPT Wed Oct 2 11:18:32 UTC 2013
(d91a619) x86_64 x86_64 x86_64 GNU/Linux
>From gcc-bugs-return-445905-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Mar 10 13:02:11 2014
Return-Path: <gcc-bugs-return-445905-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30983 invoked by alias); 10 Mar 2014 13:02:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 30936 invoked by uid 48); 10 Mar 2014 13:02:05 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/60482] Loop optimization regression
Date: Mon, 10 Mar 2014 13:02:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed
Message-ID: <bug-60482-4-NVLG3570cG@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60482-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60482-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-03/txt/msg00774.txt.bz2
Content-length: 715
http://gcc.gnu.org/bugzilla/show_bug.cgi?id`482
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-10
CC| |amker at gcc dot gnu.org,
| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started to be optimized probably with r204255, is not optimized anymore again
starting with r208165.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
@ 2014-03-14 12:57 ` rguenth at gcc dot gnu.org
2014-03-14 13:03 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-14 12:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Component|c |middle-end
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
2014-03-14 12:57 ` [Bug middle-end/60484] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2014-03-14 13:03 ` mpolacek at gcc dot gnu.org
2014-03-14 14:08 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-14 13:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> Confirmed. GCC 4.4 works.
Well, seems 4.4 puts the dump file in $PWD.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
2014-03-14 12:57 ` [Bug middle-end/60484] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-03-14 13:03 ` mpolacek at gcc dot gnu.org
@ 2014-03-14 14:08 ` mpolacek at gcc dot gnu.org
2014-03-14 15:42 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-14 14:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Anyway, this is because finish_options is called for every optimize attribute
(handle_optimize_attribute->parse_optimize_attribute->decode_options->finish_options)
+ one more time for command line options and every time it adds the directory
prefix. I guess we should add the directory prefix just once.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
` (2 preceding siblings ...)
2014-03-14 14:08 ` mpolacek at gcc dot gnu.org
@ 2014-03-14 15:42 ` jakub at gcc dot gnu.org
2014-03-14 15:55 ` mpolacek at gcc dot gnu.org
2014-03-14 16:17 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-14 15:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32348
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32348&action=edit
gcc49-pr60484.patch
Untested fix.
Alternatively, e.g. finish_options could guard it also with && loc ==
UNKNOWN_LOCATION (for calls other than the first one loc should be some real
locus).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
` (3 preceding siblings ...)
2014-03-14 15:42 ` jakub at gcc dot gnu.org
@ 2014-03-14 15:55 ` mpolacek at gcc dot gnu.org
2014-03-14 16:17 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-14 15:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I've just regtested a similar patch, so it looks good.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
` (4 preceding siblings ...)
2014-03-14 15:55 ` mpolacek at gcc dot gnu.org
@ 2014-03-14 16:17 ` mpolacek at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-03-14 16:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-03-14 16:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-10 12:51 [Bug c/60484] New: -fdump-rtl-expand and attribute optimize gives incorrect dump file path secondary.mail7865220 at gmail dot com
2014-03-14 12:57 ` [Bug middle-end/60484] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-03-14 13:03 ` mpolacek at gcc dot gnu.org
2014-03-14 14:08 ` mpolacek at gcc dot gnu.org
2014-03-14 15:42 ` jakub at gcc dot gnu.org
2014-03-14 15:55 ` mpolacek at gcc dot gnu.org
2014-03-14 16:17 ` mpolacek at gcc dot gnu.org
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).