public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/2722: Option -MD does not work in gcc>2.95 in some cases
@ 2001-05-03  2:36 vignani
  0 siblings, 0 replies; only message in thread
From: vignani @ 2001-05-03  2:36 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2722
>Category:       other
>Synopsis:       Option -MD does not work in gcc>2.95 in some cases
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 03 02:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     vignani@tin.it
>Release:        from gcc-2.96 to gcc-20010430
>Organization:
>Environment:
Linux Mandrake 8.0 on i686
>Description:
When using the -MD option with an output file with no
extension, gcc passes a wrong argument list to cc1. This
is related to a counter going down to -1 and a dot character
being written out of an array bound. Since the results are
unpredictable, it is not always possible to reproduce the
bug (e.g. it didn't show up on Linux Mandrake 7.2)
>How-To-Repeat:
gcc -v -MD anyfile.c -o anyfile
>Fix:
Patch provided for gcc-20010430. This avoids writing into
arg[-1] when no extension (dot) is found. Also, suffix_subst
is always appended, even with there is no filename.
Tested by recompiling gcc itself and dosemu (which uses -MD)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-IgorPatch; name="gcc30.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="gcc30.patch"

LS0tIGdjYy5jCVR1ZSBNYXkgIDEgMTg6Mzc6NTggMjAwMQorKysgZ2NjLmMJV2VkIE1heSAgMiAx
NjoxOTozNiAyMDAxCkBAIC01MjcxLDcgKzUyNzEsNyBAQAogCSAgICBkb19zcGVjXzEgKCIgIiwg
MCwgTlVMTF9QVFIpOwogCSAgaWYgKHN1ZmZpeF9zdWJzdCkKIAkgICAgewotCSAgICAgIHVuc2ln
bmVkIGxlbmd0aCA9IHN0cmxlbiAoYXJnKTsKKwkgICAgICBpbnQgbGVuZ3RoID0gc3RybGVuIChh
cmcpOwogCiAJICAgICAgd2hpbGUgKGxlbmd0aC0tICYmICFJU19ESVJfU0VQQVJBVE9SIChhcmdb
bGVuZ3RoXSkpCiAJCWlmIChhcmdbbGVuZ3RoXSA9PSAnLicpCkBAIC01MjgwLDExICs1MjgwLDEx
IEBACiAJCSAgICBicmVhazsKIAkJICB9CiAJICAgICAgZG9fc3BlY18xIChhcmcsIDEsIE5VTExf
UFRSKTsKLQkgICAgICBpZiAoIWFyZ1tsZW5ndGhdKQorCSAgICAgIGlmIChsZW5ndGg+PTAgJiYg
IWFyZ1tsZW5ndGhdKQogCQl7CiAJCSAgKChjaGFyICopYXJnKVtsZW5ndGhdID0gJy4nOwotCQkg
IGRvX3NwZWNfMSAoc3VmZml4X3N1YnN0LCAxLCBOVUxMX1BUUik7CiAJCX0KKwkgICAgICBkb19z
cGVjXzEgKHN1ZmZpeF9zdWJzdCwgMSwgTlVMTF9QVFIpOwogCSAgICB9CiAJICBlbHNlCiAJICAg
IGRvX3NwZWNfMSAoYXJnLCAxLCBOVUxMX1BUUik7Cg==


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-03  2:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-03  2:36 other/2722: Option -MD does not work in gcc>2.95 in some cases vignani

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).