User account creation filtered due to spam.

Bug 8190 - Failed compilation deletes -MD dependency file
Summary: Failed compilation deletes -MD dependency file
Status: RESOLVED DUPLICATE of bug 7862
Alias: None
Product: gcc
Classification: Unclassified
Component: preprocessor (show other bugs)
Version: 3.2.1
: P3 normal
Target Milestone: ---
Assignee: Neil Booth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-10 13:06 UTC by David Edelsohn
Modified: 2003-06-12 00:15 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Edelsohn 2002-10-10 13:06:00 UTC
If one compiles a source file using the -MD option to create
a ".d" dependency file and specifies an output file, then if the source file contains an error, gcc-3.2 will delete the dependency .d file and leave the .o object file. Once the failure is corrected, Make may no longer have the complete dependency information to recognize that the object file needs to be rebuilt.  Gcc-2.95 did not delete
the dependency file upon compilation failure.

Release:
gcc version 3.2.1 20020920 (prerelease)

Environment:
powerpc64-linux cross-compiler from AIX and x86-linux

How-To-Repeat:
gcc -c -MD foo.C -o foo.o
Comment 1 Neil Booth 2002-10-12 10:12:57 UTC
*** This bug has been marked as a duplicate of 7862 ***
Comment 2 Neil Booth 2002-10-12 17:10:22 UTC
From: neil@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: preprocessor/8190
Date: 12 Oct 2002 17:10:22 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	neil@gcc.gnu.org	2002-10-12 10:10:21
 
 Modified files:
 	gcc            : ChangeLog gcc.c 
 
 Log message:
 	PR preprocessor/7862
 	PR preprocessor/8190
 	* gcc.c (cpp_unique_options): Don't delete .d files.
 	Remove stray whitespace.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.15688&r2=1.15689
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gcc.c.diff?cvsroot=gcc&r1=1.342&r2=1.343
 

Comment 3 David Edelsohn 2002-10-14 21:55:27 UTC
From: dje@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: preprocessor/8190
Date: 14 Oct 2002 21:55:27 -0000

 CVSROOT:	/cvs/gcc
 Module name:	egcs
 Branch: 	gcc-3_2-branch
 Changes by:	dje@gcc.gnu.org	2002-10-14 14:55:27
 
 Modified files:
 	gcc            : ChangeLog gcc.c 
 
 Log message:
 	2002-10-14  Neil Booth  <neil@daikokuya.co.uk>
 	
 	PR preprocessor/7862
 	PR preprocessor/8190
 	* gcc.c (cpp_unique_options): Don't delete .d files.
 	Remove stray whitespace.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.13152.2.657.2.88&r2=1.13152.2.657.2.89
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/egcs/gcc/gcc.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.296.2.12.4.3&r2=1.296.2.12.4.4