public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
@ 2011-09-30  6:04 jakub at gcc dot gnu.org
  2011-09-30  6:26 ` [Bug inline-asm/50571] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-30  6:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

             Bug #: 50571
           Summary: [4.6/4.7 Regression] Undesirable folding in "m"
                    constrained asm operands
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


static const int var[4] = { 1, 2, 3, 4 };

void
foo (void)
{
  __asm volatile ("" : : "m" (*(int *) var));
}

warns at -O2:
warning: use of memory input without lvalue in asm operand 0 is deprecated
[enabled by default]

although the source has there addressable memory.  The problem is that
gimple-fold transformed this into "m" (1), which is deprecated.


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

* [Bug inline-asm/50571] [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
  2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
@ 2011-09-30  6:26 ` jakub at gcc dot gnu.org
  2011-09-30  6:55 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-30  6:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-09-30
          Component|ada                         |inline-asm
      Known to work|                            |4.5.1
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.6.2
     Ever Confirmed|0                           |1
      Known to fail|                            |4.6.1, 4.7.0


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

* [Bug inline-asm/50571] [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
  2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
  2011-09-30  6:26 ` [Bug inline-asm/50571] " jakub at gcc dot gnu.org
@ 2011-09-30  6:55 ` jakub at gcc dot gnu.org
  2011-09-30 15:23 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-30  6:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-30 06:03:43 UTC ---
Created attachment 25387
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25387
gcc47-pr50571.patch

Fix.


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

* [Bug inline-asm/50571] [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
  2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
  2011-09-30  6:26 ` [Bug inline-asm/50571] " jakub at gcc dot gnu.org
  2011-09-30  6:55 ` jakub at gcc dot gnu.org
@ 2011-09-30 15:23 ` jakub at gcc dot gnu.org
  2011-09-30 18:38 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-30 15:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-30 15:01:31 UTC ---
Author: jakub
Date: Fri Sep 30 15:01:27 2011
New Revision: 179389

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179389
Log:
    PR inline-asm/50571
    * gimple-fold.c (fold_stmt_1) <case GIMPLE_ASM>: If
    input constraints allow mem and not reg, pass true instead of
    false as second argument to maybe_fold_reference.

    * gcc.dg/pr50571.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr50571.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-fold.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug inline-asm/50571] [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
  2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-09-30 15:23 ` jakub at gcc dot gnu.org
@ 2011-09-30 18:38 ` jakub at gcc dot gnu.org
  2011-09-30 20:12 ` jakub at gcc dot gnu.org
  2012-06-12  2:45 ` amker at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-30 18:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-30 18:14:38 UTC ---
Author: jakub
Date: Fri Sep 30 18:14:33 2011
New Revision: 179402

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179402
Log:
    PR inline-asm/50571
    * gimple-fold.c (fold_stmt_1) <case GIMPLE_ASM>: If
    input constraints allow mem and not reg, pass true instead of
    false as second argument to maybe_fold_reference.

    * gcc.dg/pr50571.c: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/pr50571.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/gimple-fold.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug inline-asm/50571] [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
  2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-09-30 18:38 ` jakub at gcc dot gnu.org
@ 2011-09-30 20:12 ` jakub at gcc dot gnu.org
  2012-06-12  2:45 ` amker at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-09-30 20:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-09-30 18:55:11 UTC ---
Fixed.


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

* [Bug inline-asm/50571] [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands
  2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-09-30 20:12 ` jakub at gcc dot gnu.org
@ 2012-06-12  2:45 ` amker at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: amker at gcc dot gnu.org @ 2012-06-12  2:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50571

--- Comment #5 from amker at gcc dot gnu.org 2012-06-12 02:45:27 UTC ---
Author: amker
Date: Tue Jun 12 02:45:23 2012
New Revision: 188415

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188415
Log:
    Backport r179389 from mainline
    2011-09-30  Jakub Jelinek  <jakub@redhat.com>

    PR inline-asm/50571
    * gimple-fold.c (fold_stmt_1) <case GIMPLE_ASM>: If
    input constraints allow mem and not reg, pass true instead of
    false as second argument to maybe_fold_reference.

    * gcc.dg/pr50571.c: New test.


Added:
    branches/ARM/embedded-4_6-branch/gcc/testsuite/gcc.dg/pr50571.c
Modified:
    branches/ARM/embedded-4_6-branch/gcc/ChangeLog.arm
    branches/ARM/embedded-4_6-branch/gcc/gimple-fold.c
    branches/ARM/embedded-4_6-branch/gcc/testsuite/ChangeLog.arm


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

end of thread, other threads:[~2012-06-12  2:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-30  6:04 [Bug ada/50571] New: [4.6/4.7 Regression] Undesirable folding in "m" constrained asm operands jakub at gcc dot gnu.org
2011-09-30  6:26 ` [Bug inline-asm/50571] " jakub at gcc dot gnu.org
2011-09-30  6:55 ` jakub at gcc dot gnu.org
2011-09-30 15:23 ` jakub at gcc dot gnu.org
2011-09-30 18:38 ` jakub at gcc dot gnu.org
2011-09-30 20:12 ` jakub at gcc dot gnu.org
2012-06-12  2:45 ` amker 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).