public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/110126] New: Variables are reported as unused when only referenced by ASM statements
@ 2023-06-05 12:45 admin@tho-otto.de
  2023-06-06 14:26 ` [Bug modula2/110126] " gaius at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: admin@tho-otto.de @ 2023-06-05 12:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110126

            Bug ID: 110126
           Summary: Variables are reported as unused when only referenced
                    by ASM statements
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: admin@tho-otto.de
  Target Milestone: ---

In the following fragment:

MODULE foo;

VAR x: INTEGER;

PROCEDURE test;
BEGIN
  ASM("" : : "m"(x));
END test;

END foo.

x is reported as unused (same happens when specifying it as output parameter)

Even worse, when used as input operand only, the whole asm statement seems to
be optimized away.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-07-29 20:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 12:45 [Bug modula2/110126] New: Variables are reported as unused when only referenced by ASM statements admin@tho-otto.de
2023-06-06 14:26 ` [Bug modula2/110126] " gaius at gcc dot gnu.org
2023-06-07  5:06 ` admin@tho-otto.de
2023-06-07 12:50 ` gaius at gcc dot gnu.org
2023-06-08 20:33 ` gaius at gcc dot gnu.org
2023-06-08 23:56 ` cvs-commit at gcc dot gnu.org
2023-06-08 23:56 ` gaius at gcc dot gnu.org
2023-06-09  6:21 ` admin@tho-otto.de
2023-06-09  7:19 ` admin@tho-otto.de
2023-06-12 12:26 ` gaius at gcc dot gnu.org
2023-06-12 13:35 ` admin@tho-otto.de
2023-06-12 14:26 ` cvs-commit at gcc dot gnu.org
2023-06-12 14:28 ` gaius at gcc dot gnu.org
2023-06-13 11:36 ` admin@tho-otto.de
2023-07-11 18:13 ` admin@tho-otto.de
2023-07-29 16:25 ` cvs-commit at gcc dot gnu.org
2023-07-29 20:04 ` cvs-commit at gcc dot gnu.org
2023-07-29 20:13 ` gaius 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).