public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument
@ 2022-04-22 23:20 izbyshev at ispras dot ru
2022-04-26 9:31 ` [Bug target/105355] " marxin at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: izbyshev at ispras dot ru @ 2022-04-22 23:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
Bug ID: 105355
Summary: -msmall-data-limit= unexpectedly accepts a separate
argument
Product: gcc
Version: 10.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: izbyshev at ispras dot ru
Target Milestone: ---
Target: riscv64-linux-gnu
"msmall-data-limit=" is marked as both Joined and Separate at
https://gcc.gnu.org/git?p=gcc.git;a=blob;f=gcc/config/riscv/riscv.opt;h=492aad1232404c2711811c3d04f2e02902d1b740;hb=7964ab6c364c410c34efe7ca2eba797d36525349#l95.
This is inconsistent with other "-m" options (which permit only joined
spelling) and allows strange commands like "riscv64-linux-gnu-gcc
-msmall-data-limit= 0 test.c".
Note that even if joined spelling is used by the user, GCC driver splits it for
the frontend:
riscv64-linux-gnu-gcc -msmall-data-limit=0 test.c -###
[...]
/usr/lib/gcc-cross/riscv64-linux-gnu/10/cc1 -quiet -imultilib . -imultiarch
riscv64-linux-gnu test.c -quiet -dumpbase test.c "-mno-small-data-limit=" 0
"-march=rv64imafdc" "-mabi=lp64d" -auxbase test -fstack-protector-strong
-Wformat -Wformat-security -o /tmp/ccIJvDDO.s
[...]
This inconsistency unnecessarily complicates life of tools that parse compiler
commands (e.g. for static analysis).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
@ 2022-04-26 9:31 ` marxin at gcc dot gnu.org
2022-04-26 9:35 ` marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-26 9:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
Last reconfirmed| |2022-04-26
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I think it's bogus having Separate and Joined properties for an option that
ends with '='. We've got one more example and it leads to bogus:
$ gcc -output-pch= pes.pch a.c --save-temps --verbose
...
/home/marxin/bin/gcc/libexec/gcc/x86_64-pc-linux-gnu/12.0.1/cc1 -fpreprocessed
utput-pch=-a.i ...
which is wrongly truncated.
I'm going to fix it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
2022-04-26 9:31 ` [Bug target/105355] " marxin at gcc dot gnu.org
@ 2022-04-26 9:35 ` marxin at gcc dot gnu.org
2022-04-26 9:39 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-26 9:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
> $ gcc -output-pch= pes.pch a.c --save-temps --verbose
> ...
> /home/marxin/bin/gcc/libexec/gcc/x86_64-pc-linux-gnu/12.0.1/cc1
> -fpreprocessed utput-pch=-a.i ...
This one is actually -o utput-pch=, I should have used --output-pch= pes.pch.
But still..
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
2022-04-26 9:31 ` [Bug target/105355] " marxin at gcc dot gnu.org
2022-04-26 9:35 ` marxin at gcc dot gnu.org
@ 2022-04-26 9:39 ` marxin at gcc dot gnu.org
2022-04-26 10:06 ` izbyshev at ispras dot ru
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-04-26 9:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
` (2 preceding siblings ...)
2022-04-26 9:39 ` marxin at gcc dot gnu.org
@ 2022-04-26 10:06 ` izbyshev at ispras dot ru
2022-05-11 6:56 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: izbyshev at ispras dot ru @ 2022-04-26 10:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
--- Comment #3 from Alexey Izbyshev <izbyshev at ispras dot ru> ---
(In reply to Martin Liška from comment #2)
Yes, "gcc test.h -o test.pch" uses the separate spelling of "--output-pch=" in
cc1 command line (but, curiously, "gcc test.h" uses the joined spelling).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
` (3 preceding siblings ...)
2022-04-26 10:06 ` izbyshev at ispras dot ru
@ 2022-05-11 6:56 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:57 ` marxin at gcc dot gnu.org
2022-05-11 15:46 ` palmer at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-11 6:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:9e1e962eac8d2a28fcd648a0f5c8eb0022abd8e4
commit r13-282-g9e1e962eac8d2a28fcd648a0f5c8eb0022abd8e4
Author: Martin Liska <mliska@suse.cz>
Date: Tue Apr 26 11:41:09 2022 +0200
opts: do not allow Separate+Joined ending with =
Do not allow strange option format:
-msmall-data-limit= 11.
For -output-pch we need to use Separate syntax as lang spec
rules automatically append a space.
PR target/105355
gcc/ChangeLog:
* config/riscv/riscv.opt: Remove Separate from
-msmall-data-limit=.
* optc-gen.awk: Report error for the described situation.
* gcc.cc: Use Separate syntax.
* opts.cc (gen_command_line_string): Change option name.
gcc/c-family/ChangeLog:
* c-opts.cc (c_common_handle_option): Change option name.
* c.opt: Remove Joined and use Separate option.
gcc/cp/ChangeLog:
* lang-specs.h: Use Separate syntax.
gcc/objc/ChangeLog:
* lang-specs.h: Use Separate syntax.
gcc/objcp/ChangeLog:
* lang-specs.h: Use Separate syntax.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
` (4 preceding siblings ...)
2022-05-11 6:56 ` cvs-commit at gcc dot gnu.org
@ 2022-05-11 6:57 ` marxin at gcc dot gnu.org
2022-05-11 15:46 ` palmer at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-11 6:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master, not planning doing a backport.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/105355] -msmall-data-limit= unexpectedly accepts a separate argument
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
` (5 preceding siblings ...)
2022-05-11 6:57 ` marxin at gcc dot gnu.org
@ 2022-05-11 15:46 ` palmer at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: palmer at gcc dot gnu.org @ 2022-05-11 15:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105355
palmer at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palmer at gcc dot gnu.org
--- Comment #6 from palmer at gcc dot gnu.org ---
Sorry, I hadn't seen the original bug. This looks good to me, I don't think
there was any use case for something like "-msmall-data-limit= N" (ie, with the
space). Looks like that's been there since the original port, so it was
probably just an oversight.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-11 15:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 23:20 [Bug driver/105355] New: -msmall-data-limit= unexpectedly accepts a separate argument izbyshev at ispras dot ru
2022-04-26 9:31 ` [Bug target/105355] " marxin at gcc dot gnu.org
2022-04-26 9:35 ` marxin at gcc dot gnu.org
2022-04-26 9:39 ` marxin at gcc dot gnu.org
2022-04-26 10:06 ` izbyshev at ispras dot ru
2022-05-11 6:56 ` cvs-commit at gcc dot gnu.org
2022-05-11 6:57 ` marxin at gcc dot gnu.org
2022-05-11 15:46 ` palmer 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).