public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60712] New: "restrict" qualifier ignored on local variable or after inlining
@ 2014-03-30 17:51 gbugcc at binkmail dot com
  2014-03-31  1:09 ` [Bug tree-optimization/60712] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gbugcc at binkmail dot com @ 2014-03-30 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60712
           Summary: "restrict" qualifier ignored on local variable or
                    after inlining
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gbugcc at binkmail dot com

Created attachment 32490
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32490&action=edit
Test case

Version: x86_64-w64-mingw32-gcc 4.8.2 (standard Cygwin binaries)
Flags: gcc -std=c99 -O3

sum()'s loop is optimized into a single multiply, as it should.

But when inlined automatically by the compiler or "manually" by applying
restrict qualifiers to local variables, the optimization fails.

This is might be the same as bug 58526. However, -fdump-tree-alias shows that
inlining removed all restrict qualifiers, whereas they are still present in the
type information of bug_when_local_variable(), so perhaps there are two
distinct bugs here.


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

* [Bug tree-optimization/60712] "restrict" qualifier ignored on local variable or after inlining
  2014-03-30 17:51 [Bug tree-optimization/60712] New: "restrict" qualifier ignored on local variable or after inlining gbugcc at binkmail dot com
@ 2014-03-31  1:09 ` pinskia at gcc dot gnu.org
  2014-03-31  8:21 ` rguenth at gcc dot gnu.org
  2022-02-10  8:16 ` [Bug tree-optimization/60712] "restrict" qualifier ignored on local variable rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-31  1:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The inline issue is recorded as 58526.


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

* [Bug tree-optimization/60712] "restrict" qualifier ignored on local variable or after inlining
  2014-03-30 17:51 [Bug tree-optimization/60712] New: "restrict" qualifier ignored on local variable or after inlining gbugcc at binkmail dot com
  2014-03-31  1:09 ` [Bug tree-optimization/60712] " pinskia at gcc dot gnu.org
@ 2014-03-31  8:21 ` rguenth at gcc dot gnu.org
  2022-02-10  8:16 ` [Bug tree-optimization/60712] "restrict" qualifier ignored on local variable rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-31  8:21 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-31
             Blocks|                            |49774
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Only restrict on parameters is implemented.


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

* [Bug tree-optimization/60712] "restrict" qualifier ignored on local variable
  2014-03-30 17:51 [Bug tree-optimization/60712] New: "restrict" qualifier ignored on local variable or after inlining gbugcc at binkmail dot com
  2014-03-31  1:09 ` [Bug tree-optimization/60712] " pinskia at gcc dot gnu.org
  2014-03-31  8:21 ` rguenth at gcc dot gnu.org
@ 2022-02-10  8:16 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-10  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|"restrict" qualifier        |"restrict" qualifier
                   |ignored on local variable   |ignored on local variable
                   |or after inlining           |
             Blocks|104466                      |

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
After inlining works as expected now (see comment#4 which shows this).  We do
not honor __restrict on local variables because we cannot adhere to the
language constraints within our implementation framework.  We only can do that
for function parameters.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104466
[Bug 104466] Inlining functions with restrict parameters can inhibit lim (e.g.
in 554.roms_r)

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

end of thread, other threads:[~2022-02-10  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-30 17:51 [Bug tree-optimization/60712] New: "restrict" qualifier ignored on local variable or after inlining gbugcc at binkmail dot com
2014-03-31  1:09 ` [Bug tree-optimization/60712] " pinskia at gcc dot gnu.org
2014-03-31  8:21 ` rguenth at gcc dot gnu.org
2022-02-10  8:16 ` [Bug tree-optimization/60712] "restrict" qualifier ignored on local variable rguenth 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).