public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
@ 2014-10-06 6:29 ` pinskia at gcc dot gnu.org
2014-10-06 21:46 ` manu at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-10-06 6:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wkoszek at gmail dot com
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 63462 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
2014-10-06 6:29 ` [Bug driver/36312] should refuse to overwrite input file with output file pinskia at gcc dot gnu.org
@ 2014-10-06 21:46 ` manu at gcc dot gnu.org
2014-11-05 17:24 ` manu at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2014-10-06 21:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Created attachment 33656
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33656&action=edit
Possible fix
The attached patch implements this for the driver and toplev.c. Probably the
final version needs to move canonical_filename_eq to libiberty. It builds but I
haven't tested it beyond a few quick tests. Perhaps it needs testcases.
>From gcc-bugs-return-463406-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 06 21:56:05 2014
Return-Path: <gcc-bugs-return-463406-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19510 invoked by alias); 6 Oct 2014 21:56:05 -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 19442 invoked by uid 55); 6 Oct 2014 21:56:00 -0000
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/61886] [4.8/4.9/5 Regression] LTO breaks fread with _FORTIFY_SOURCE=2
Date: Mon, 06 Oct 2014 21:56:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 4.9.1
X-Bugzilla-Keywords: diagnostic, lto, wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hubicka at ucw dot cz
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.4
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61886-4-Pl4XpPzvGX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61886-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61886-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-10/txt/msg00427.txt.bz2
Content-length: 5483
https://gcc.gnu.org/bugzilla/show_bug.cgi?ida886
--- Comment #13 from Jan Hubicka <hubicka at ucw dot cz> ---
Hi,
I am testing this variant of the patch.
For gcc-4.9 branch it may make sense to enable the new patch for LTO only.
Index: internal-fn.c
==================================================================--- internal-fn.c (revision 215958)
+++ internal-fn.c (working copy)
@@ -37,6 +37,8 @@ along with GCC; see the file COPYING3.
#include "stringpool.h"
#include "tree-ssanames.h"
#include "diagnostic-core.h"
+#include "builtins.h"
+#include "pretty-print.h"
/* The names of each internal function, indexed by function number. */
const char *const internal_fn_name_array[] = {
@@ -915,6 +917,26 @@ expand_BUILTIN_EXPECT (gimple stmt)
emit_move_insn (target, val);
}
+static void
+expand_OUTPUT_ERROR (gimple stmt)
+{
+ const char * arg0 = c_getstr (gimple_call_arg (stmt, 0));
+ const char * arg1 = c_getstr (gimple_call_arg (stmt, 1));
+ error_at (gimple_location (stmt),
+ "Call to %qs declared with attribute error: %s",
+ arg0, identifier_to_locale (arg1));
+}
+
+static void
+expand_OUTPUT_WARNING (gimple stmt)
+{
+ const char * arg0 = c_getstr (gimple_call_arg (stmt, 0));
+ const char * arg1 = c_getstr (gimple_call_arg (stmt, 1));
+ warning_at (gimple_location (stmt),
+ 0, "call to %qs declared with attribute warning: %s",
+ arg0, identifier_to_locale (arg1));
+}
+
/* Routines to expand each internal function, indexed by function number.
Each routine has the prototype:
Index: cgraphunit.c
==================================================================--- cgraphunit.c (revision 215958)
+++ cgraphunit.c (working copy)
@@ -211,6 +211,8 @@ along with GCC; see the file COPYING3.
#include "tree-nested.h"
#include "gimplify.h"
#include "dbgcnt.h"
+#include "expr.h"
+#include "internal-fn.h"
/* Queue of cgraph nodes scheduled to be added into cgraph. This is a
secondary queue used during optimization to accommodate passes that
@@ -976,8 +978,29 @@ analyze_functions (void)
cnode->analyze ();
for (edge = cnode->callees; edge; edge = edge->next_callee)
- if (edge->callee->definition)
- enqueue_node (edge->callee);
+ {
+ tree attr, err_attr = NULL;
+ if (edge->callee->definition)
+ enqueue_node (edge->callee);
+ if ((attr = lookup_attribute ("warning",
+ DECL_ATTRIBUTES (edge->callee->decl))) != NULL
+ || (err_attr = lookup_attribute ("warning",
+ DECL_ATTRIBUTES (edge->callee->decl))))
+ {
+ gimple_stmt_iterator gsi = gsi_for_stmt (edge->call_stmt);
+ const char *arg0 = lang_hooks.decl_printable_name
(edge->callee->decl, 1);
+ const char *arg1= TREE_STRING_POINTER
+ (TREE_VALUE (TREE_VALUE (attr ? attr : err_attr)));
+
+ gimple call = gimple_build_call_internal
+ (attr ? IFN_OUTPUT_WARNING : IFN_OUTPUT_ERROR, 2,
+ build_string_literal (strlen (arg0), arg0),
+ build_string_literal (strlen (arg1), arg1));
+ gsi_insert_before (&gsi, call, GSI_SAME_STMT);
+ gimple_set_location (call, gimple_location (edge->call_stmt));
+ gimple_set_block (call, gimple_block (edge->call_stmt));
+ }
+ }
if (optimize && flag_devirtualize)
{
cgraph_edge *next;
Index: expr.c
==================================================================--- expr.c (revision 215958)
+++ expr.c (working copy)
@@ -10346,21 +10346,7 @@ expand_expr_real_1 (tree exp, rtx target
if (CALL_EXPR_VA_ARG_PACK (exp))
error ("%Kinvalid use of %<__builtin_va_arg_pack ()%>", exp);
{
- tree fndecl = get_callee_fndecl (exp), attr;
-
- if (fndecl
- && (attr = lookup_attribute ("error",
- DECL_ATTRIBUTES (fndecl))) != NULL)
- error ("%Kcall to %qs declared with attribute error: %s",
- exp, identifier_to_locale (lang_hooks.decl_printable_name (fndecl,
1)),
- TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
- if (fndecl
- && (attr = lookup_attribute ("warning",
- DECL_ATTRIBUTES (fndecl))) != NULL)
- warning_at (tree_nonartificial_location (exp),
- 0, "%Kcall to %qs declared with attribute warning: %s",
- exp, identifier_to_locale (lang_hooks.decl_printable_name
(fndecl, 1)),
- TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (attr))));
+ tree fndecl = get_callee_fndecl (exp);
/* Check for a built-in function. */
if (fndecl && DECL_BUILT_IN (fndecl))
Index: internal-fn.def
==================================================================--- internal-fn.def (revision 215958)
+++ internal-fn.def (working copy)
@@ -56,3 +56,5 @@ DEF_INTERNAL_FN (UBSAN_CHECK_MUL, ECF_CO
DEF_INTERNAL_FN (ABNORMAL_DISPATCHER, ECF_NORETURN, NULL)
DEF_INTERNAL_FN (BUILTIN_EXPECT, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL)
DEF_INTERNAL_FN (ASAN_CHECK, ECF_TM_PURE | ECF_LEAF | ECF_NOTHROW, ".W...")
+DEF_INTERNAL_FN (OUTPUT_ERROR, ECF_TM_PURE | ECF_LEAF | ECF_CONST |
ECF_NOTHROW | ECF_LOOPING_CONST_OR_PURE, NULL)
+DEF_INTERNAL_FN (OUTPUT_WARNING, ECF_TM_PURE | ECF_LEAF | ECF_CONST |
ECF_NOTHROW | ECF_LOOPING_CONST_OR_PURE, NULL)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
2014-10-06 6:29 ` [Bug driver/36312] should refuse to overwrite input file with output file pinskia at gcc dot gnu.org
2014-10-06 21:46 ` manu at gcc dot gnu.org
@ 2014-11-05 17:24 ` manu at gcc dot gnu.org
2014-11-05 17:40 ` wkoszek at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2014-11-05 17:24 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 8741 bytes --]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Author: manu
Date: Wed Nov 5 17:23:46 2014
New Revision: 217149
URL: https://gcc.gnu.org/viewcvs?rev=217149&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* gcc.misc-tests/output.exp: New test case for identical input and
output files.
include/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* filenames.h: Add prototype for canonical_filename_eq.
gcc/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* diagnostic-core.h: Add prototype for fatal_error.
* diagnostic.c (fatal_error): New function fatal_error.
* gcc.c (store_arg): Remove have_o_argbuf_index.
(process_command): Check if input and output files are the same.
* toplev.c (init_asm_output): Check if input and output files are
the same.
libiberty/ChangeLog:
2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
PR driver/36312
* filename_cmp.c (canonical_filename_eq): New function to check if
file names are the same.
* functions.texi: Updated with documentation for new function.
Added:
trunk/gcc/testsuite/gcc.misc-tests/output.exp
Modified:
trunk/gcc/ChangeLog
trunk/gcc/diagnostic-core.h
trunk/gcc/diagnostic.c
trunk/gcc/gcc.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/toplev.c
trunk/include/ChangeLog
trunk/include/filenames.h
trunk/libiberty/ChangeLog
trunk/libiberty/filename_cmp.c
trunk/libiberty/functions.texi
>From gcc-bugs-return-465821-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 05 17:32:41 2014
Return-Path: <gcc-bugs-return-465821-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 9806 invoked by alias); 5 Nov 2014 17:32:41 -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 9748 invoked by uid 48); 5 Nov 2014 17:32:34 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug driver/36312] should refuse to overwrite input file with output file
Date: Wed, 05 Nov 2014 17:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: driver
X-Bugzilla-Version: 4.1.2
X-Bugzilla-Keywords: diagnostic, patch
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
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 resolution
Message-ID: <bug-36312-4-p1RrkO1xnN@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-36312-4@http.gcc.gnu.org/bugzilla/>
References: <bug-36312-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-11/txt/msg00293.txt.bz2
Content-length: 645
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Anthony Brandon updated my patch and added a testcase, so this is fixed in GCC
5.0. This was his second contribution to GCC, which shows that "Contributing to
GCC is hard" is a myth.
>From gcc-bugs-return-465822-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 05 17:37:56 2014
Return-Path: <gcc-bugs-return-465822-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 16043 invoked by alias); 5 Nov 2014 17:37:56 -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 16031 invoked by uid 89); 5 Nov 2014 17:37:53 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2
X-HELO: service87.mimecast.com
Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Nov 2014 17:37:51 +0000
Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 05 Nov 2014 17:37:49 +0000
Received: from e105689-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 Nov 2014 17:37:48 +0000
Message-ID: <545A606C.8010103@arm.com>
Date: Wed, 05 Nov 2014 17:37:00 -0000
From: Richard Earnshaw <rearnsha@arm.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: Michael Felt <aixtools@gmail.com>, gcc-bugs@gcc.gnu.org
Subject: Re: Suggestions welcomed to get bootstrap to work
References: <CANvxniXPvdjBFxnmgusbxfHkmNniUQFgpDeu_vzhBL869LXUkw@mail.gmail.com> <CANvxniWM¶MbnFJCKW6x0RAmKmxA6xTCnE6ke8v8cZR7d4KYQ@mail.gmail.com>
In-Reply-To: <CANvxniWM¶MbnFJCKW6x0RAmKmxA6xTCnE6ke8v8cZR7d4KYQ@mail.gmail.com>
X-MC-Unique: 114110517374901401
Content-Type: text/plain; charset=WINDOWS-1252
Content-Transfer-Encoding: quoted-printable
X-SW-Source: 2014-11/txt/msg00294.txt.bz2
Content-length: 2345
You would probably be better of discussing this on gcc-help. gcc-bugs
is rather full of bugzilla traffic and normal mails are easily missed.
Have you tried setting CONFIG_SHELL in the environment? Also, when
running the build use something like
make SHELL=/bin/bash
R.
On 03/11/14 20:22, Michael Felt wrote:
> What I have not yet found is how to get the SHELL variable to not use
> /bin/sh because this is causing a failure immediately at the start of
> make:
>
> root@x064:[/data/prj/gnu/gcc/objdir/gcc-4.7.4]make
> [ -f stage_final ] || echo stage3 > stage_final
> /bin/sh[3]: 0403-057 Syntax error at line 1 : `-qlanglvl=extc89' is
> not expected.
> make: *** [all] Error 2
>
> Setting a link from /bin/sh to "bash" is just a way of breaking the
> host. I hope there is be a normal way to resolve this.
>
> regards,
> Michael
>
> p.s. 4.5.4 fails elsewhere - it does not come as far as 4.7.4 or 4.6.4
>
> On Mon, Nov 3, 2014 at 9:19 PM, Michael Felt <aixtools@gmail.com> wrote:
>> I fear that after being set to "wontfix" an entry such as
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63714 will be completely
>> ignored.
>>
>>
>> That is not what I was expecting having spent nearly 8 hours yesterday
>> looking for something I may have missed.
>>
>> I do not understand how to move forward from: Don't bootstrap GCC with
>> IBM XLC. - considering that is the compiler I have.
>>
>> As I commented in the "bug" above, there are issues I have run into
>> with gcc from other sources. If it turns out there is no other way,
>> then that shall be the path forced upon me - but I prefer to research
>> and package my own so that the demands on the host finally get
>> documented - rather than libraries that step on each other and damage
>> existing programs.
>>
>> That my submission is on the "bug-list" is because that is what seemed
>> to be the correct path to submit a question. That gcc decides to never
>> include any result in the source tree is of course your choice.
>>
>> I merely wish to express my hope for some sort of assistance in moving
>> forward versus a stonewall of "don't care".
>>
>> FYI: I am trying 4.5.4 now as well, but I fear the same result.
>>
>> Maybe it is just a shell thing (e.g. needs a specific bash behavior)
>>
>> I shall continue to post, suggestions welcome.
>>
>> Michael
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-11-05 17:24 ` manu at gcc dot gnu.org
@ 2014-11-05 17:40 ` wkoszek at gmail dot com
2014-11-05 23:58 ` manu at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: wkoszek at gmail dot com @ 2014-11-05 17:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
--- Comment #10 from Wojciech Koszek <wkoszek at gmail dot com> ---
I'm very happy seeing it in GCC.
On Wed, Nov 5, 2014 at 9:24 AM, manu at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
>
> --- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
> Author: manu
> Date: Wed Nov 5 17:23:46 2014
> New Revision: 217149
>
> URL: https://gcc.gnu.org/viewcvs?rev=217149&root=gcc&view=rev
> Log:
>
> gcc/testsuite/ChangeLog:
>
> 2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
>
> PR driver/36312
> * gcc.misc-tests/output.exp: New test case for identical input and
> output files.
>
> include/ChangeLog:
>
> 2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
>
> PR driver/36312
> * filenames.h: Add prototype for canonical_filename_eq.
>
> gcc/ChangeLog:
>
> 2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
>
> PR driver/36312
> * diagnostic-core.h: Add prototype for fatal_error.
> * diagnostic.c (fatal_error): New function fatal_error.
> * gcc.c (store_arg): Remove have_o_argbuf_index.
> (process_command): Check if input and output files are the same.
> * toplev.c (init_asm_output): Check if input and output files are
> the same.
>
> libiberty/ChangeLog:
>
> 2014-11-05 Anthony Brandon <anthony.brandon@gmail.com>
>
> PR driver/36312
> * filename_cmp.c (canonical_filename_eq): New function to check if
> file names are the same.
> * functions.texi: Updated with documentation for new function.
>
> Added:
> trunk/gcc/testsuite/gcc.misc-tests/output.exp
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/diagnostic-core.h
> trunk/gcc/diagnostic.c
> trunk/gcc/gcc.c
> trunk/gcc/testsuite/ChangeLog
> trunk/gcc/toplev.c
> trunk/include/ChangeLog
> trunk/include/filenames.h
> trunk/libiberty/ChangeLog
> trunk/libiberty/filename_cmp.c
> trunk/libiberty/functions.texi
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>
>From gcc-bugs-return-465825-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 05 17:54:09 2014
Return-Path: <gcc-bugs-return-465825-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 28837 invoked by alias); 5 Nov 2014 17:54:09 -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 28773 invoked by uid 48); 5 Nov 2014 17:54:05 -0000
From: "howarth at bromo dot med.uc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/63622] [5.0 Regression] Bootstrap fails on x86_64-apple-darwin1[34] after revision r216305
Date: Wed, 05 Nov 2014 17:54:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: bootstrap
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: blocker
X-Bugzilla-Who: howarth at bromo dot med.uc.edu
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63622-4-VDgpQTWVBw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63622-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63622-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-11/txt/msg00297.txt.bz2
Content-length: 419
https://gcc.gnu.org/bugzilla/show_bug.cgi?idc622
--- Comment #8 from howarth at bromo dot med.uc.edu ---
At r217144 with https://gcc.gnu.org/bugzilla/attachment.cgi?id3897 to fix
PR63750, gcc trunk now bootstraps up to the "illegal text reloc" error. Is this
problem understood well enough to debug or should I send a standalone test case
to the darwin linker developer for further analysis of the linkage error?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-11-05 17:40 ` wkoszek at gmail dot com
@ 2014-11-05 23:58 ` manu at gcc dot gnu.org
2014-11-19 14:40 ` carlos at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: manu at gcc dot gnu.org @ 2014-11-05 23:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Unfortunately, the patch broke Ada:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00368.html
so I have reverted it.
>From gcc-bugs-return-465852-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 06 00:01:27 2014
Return-Path: <gcc-bugs-return-465852-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15820 invoked by alias); 6 Nov 2014 00:01:27 -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 15777 invoked by uid 48); 6 Nov 2014 00:01:23 -0000
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/63751] ICE in tree_to_uhwi, at tree.h:3668
Date: Thu, 06 Nov 2014 00:01:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: doko 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: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-63751-4-dcH09ndt9c@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63751-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63751-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-11/txt/msg00324.txt.bz2
Content-length: 168
https://gcc.gnu.org/bugzilla/show_bug.cgi?idc751
--- Comment #2 from Matthias Klose <doko at gcc dot gnu.org> ---
and it needed r211910, found after a first build.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2014-11-05 23:58 ` manu at gcc dot gnu.org
@ 2014-11-19 14:40 ` carlos at gcc dot gnu.org
2014-11-19 18:12 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: carlos at gcc dot gnu.org @ 2014-11-19 14:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
carlos at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |carlos at gcc dot gnu.org
Resolution|FIXED |---
--- Comment #15 from carlos at gcc dot gnu.org ---
This breaks glibc builds.
It is a common configure idiom to use /dev/null in both input and output files.
For example:
configure:72: checking for AVX support
configure:78: /home/triegel/local/gcc/bin/gcc -mavx -xc /dev/null -S -o
/dev/null
gcc: fatal error: input file '/dev/null' is the same as output file
compilation terminated.
configure:81: $? = 1
configure:89: result: no
There is no need for a temporary file and it would slow down configure.
I expect that this change will break many more packages in the distribution
builds because of this common idiom.
It would be sufficient if /dev/null were special cased in some way for Linux
configurations.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2014-11-19 14:40 ` carlos at gcc dot gnu.org
@ 2014-11-19 18:12 ` jakub at gcc dot gnu.org
2014-11-19 18:39 ` trippels at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-11-19 18:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Nov 19 18:11:54 2014
New Revision: 217789
URL: https://gcc.gnu.org/viewcvs?rev=217789&root=gcc&view=rev
Log:
PR driver/36312
PR driver/63837
* gcc.c (process_command): Don't check for input/output
filename equality if output is HOST_BIT_BUCKET.
* toplev.c (init_asm_output): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcc.c
trunk/gcc/toplev.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2014-11-19 18:12 ` jakub at gcc dot gnu.org
@ 2014-11-19 18:39 ` trippels at gcc dot gnu.org
2015-06-22 18:13 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 16+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-11-19 18:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
CC| |trippels at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #18 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2014-11-19 18:39 ` trippels at gcc dot gnu.org
@ 2015-06-22 18:13 ` mpolacek at gcc dot gnu.org
2023-10-14 9:17 ` sarvelgcc at outlook dot com
2024-02-13 23:53 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 16+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-06-22 18:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yongjin.ohn at lge dot com
--- Comment #19 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 66531 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2015-06-22 18:13 ` mpolacek at gcc dot gnu.org
@ 2023-10-14 9:17 ` sarvelgcc at outlook dot com
2024-02-13 23:53 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 16+ messages in thread
From: sarvelgcc at outlook dot com @ 2023-10-14 9:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
sarvel <sarvelgcc at outlook dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sarvelgcc at outlook dot com
--- Comment #23 from sarvel <sarvelgcc at outlook dot com> ---
Created attachment 56105
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56105&action=edit
possible fix to overwriting source code
added a possible fix, not sure whether thats the best approach as some source
extensions may be missed
alternatively list of extensions for executable files may be used but *I think*
it is easier to get list of all extensions for source files rather than
executables
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2023-10-14 9:17 ` sarvelgcc at outlook dot com
@ 2024-02-13 23:53 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-13 23:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
--- Comment #24 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Riccardo Mutschlechner from comment #21)
> Not sure if this is the best place to start, but here goes. I've noticed
> another similar issue.
>
> Let's say you've compiled a binary, `test`, from a source `test.c`. If you
> then flip the arguments to gcc by mistake, `gcc -o test.c test` rather than
> `gcc -o test test.c`, you will overwrite the source file by trying to
> compile the binary, thus losing it permanently without some other backup.
That is PR 80182 really.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
2008-05-23 11:44 [Bug c/36312] New: Compiling options shoaib dot jameel at gmail dot com
` (3 preceding siblings ...)
2008-05-23 17:06 ` shoaib dot jameel at gmail dot com
@ 2008-10-07 10:55 ` sam at gcc dot gnu dot org
4 siblings, 0 replies; 16+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-10-07 10:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from sam at gcc dot gnu dot org 2008-10-07 10:53 -------
A warning would be of no use, as it would be too late to recover the input
file. Having GCC refuse to run in this case would be great.
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
2008-05-23 11:44 [Bug c/36312] New: Compiling options shoaib dot jameel at gmail dot com
` (2 preceding siblings ...)
2008-05-23 17:01 ` rguenth at gcc dot gnu dot org
@ 2008-05-23 17:06 ` shoaib dot jameel at gmail dot com
2008-10-07 10:55 ` sam at gcc dot gnu dot org
4 siblings, 0 replies; 16+ messages in thread
From: shoaib dot jameel at gmail dot com @ 2008-05-23 17:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from shoaib dot jameel at gmail dot com 2008-05-23 17:05 -------
(In reply to comment #3)
> I didn't lose anything - the internet backs up for me.
THe problem with me is rather grave. I dont even have a backup. Any method by
which I can recover the source code? I need the codes desperately.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
2008-05-23 11:44 [Bug c/36312] New: Compiling options shoaib dot jameel at gmail dot com
2008-05-23 16:42 ` [Bug driver/36312] should refuse to overwrite input file with output file rguenth at gcc dot gnu dot org
2008-05-23 16:49 ` shoaib dot jameel at gmail dot com
@ 2008-05-23 17:01 ` rguenth at gcc dot gnu dot org
2008-05-23 17:06 ` shoaib dot jameel at gmail dot com
2008-10-07 10:55 ` sam at gcc dot gnu dot org
4 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-23 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-05-23 17:01 -------
I didn't lose anything - the internet backs up for me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
2008-05-23 11:44 [Bug c/36312] New: Compiling options shoaib dot jameel at gmail dot com
2008-05-23 16:42 ` [Bug driver/36312] should refuse to overwrite input file with output file rguenth at gcc dot gnu dot org
@ 2008-05-23 16:49 ` shoaib dot jameel at gmail dot com
2008-05-23 17:01 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: shoaib dot jameel at gmail dot com @ 2008-05-23 16:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from shoaib dot jameel at gmail dot com 2008-05-23 16:48 -------
(In reply to comment #1)
> Happened to me as well.
any remedy...so as to recover the lost C codes?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug driver/36312] should refuse to overwrite input file with output file
2008-05-23 11:44 [Bug c/36312] New: Compiling options shoaib dot jameel at gmail dot com
@ 2008-05-23 16:42 ` rguenth at gcc dot gnu dot org
2008-05-23 16:49 ` shoaib dot jameel at gmail dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-05-23 16:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-05-23 16:41 -------
Happened to me as well.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2008-05-23 16:41:35
date| |
Summary|Compiling options |should refuse to overwrite
| |input file with output file
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-02-13 23:53 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-36312-4@http.gcc.gnu.org/bugzilla/>
2014-10-06 6:29 ` [Bug driver/36312] should refuse to overwrite input file with output file pinskia at gcc dot gnu.org
2014-10-06 21:46 ` manu at gcc dot gnu.org
2014-11-05 17:24 ` manu at gcc dot gnu.org
2014-11-05 17:40 ` wkoszek at gmail dot com
2014-11-05 23:58 ` manu at gcc dot gnu.org
2014-11-19 14:40 ` carlos at gcc dot gnu.org
2014-11-19 18:12 ` jakub at gcc dot gnu.org
2014-11-19 18:39 ` trippels at gcc dot gnu.org
2015-06-22 18:13 ` mpolacek at gcc dot gnu.org
2023-10-14 9:17 ` sarvelgcc at outlook dot com
2024-02-13 23:53 ` pinskia at gcc dot gnu.org
2008-05-23 11:44 [Bug c/36312] New: Compiling options shoaib dot jameel at gmail dot com
2008-05-23 16:42 ` [Bug driver/36312] should refuse to overwrite input file with output file rguenth at gcc dot gnu dot org
2008-05-23 16:49 ` shoaib dot jameel at gmail dot com
2008-05-23 17:01 ` rguenth at gcc dot gnu dot org
2008-05-23 17:06 ` shoaib dot jameel at gmail dot com
2008-10-07 10:55 ` sam at gcc dot gnu dot 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).