public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94317] New: gcc/config/arm/arm_mve.h:13907: strange assignment ?
@ 2020-03-25  7:19 dcb314 at hotmail dot com
  2020-03-25  7:43 ` [Bug target/94317] " dcb314 at hotmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2020-03-25  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94317
           Summary: gcc/config/arm/arm_mve.h:13907: strange assignment ?
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

>From static analyzer cppcheck:

gcc/config/arm/arm_mve.h:13907:3: warning: Assignment of function parameter has
no effect outside the function. Did you forget dereferencing it?
[uselessAssignmentPtrArg]

Source code is

__extension__ extern __inline int64x2_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
__arm_vldrdq_gather_base_wb_s64 (uint64x2_t * __addr, const int __offset)
{
  int64x2_t
  result = __builtin_mve_vldrdq_gather_base_wb_sv2di (*__addr, __offset);
  __addr += __offset;
  return result;
}

Maybe better code:

__extension__ extern __inline int64x2_t
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
__arm_vldrdq_gather_base_wb_s64 (uint64x2_t * __addr, const int __offset)
{
  int64x2_t
  result = __builtin_mve_vldrdq_gather_base_wb_sv2di (*__addr, __offset);
  *__addr += __offset; // here
  return result;
}

There seem to be a few duplicates:

> trunk.git/gcc/config/arm/arm_mve.h:13917:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
> trunk.git/gcc/config/arm/arm_mve.h:13927:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
> trunk.git/gcc/config/arm/arm_mve.h:13937:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
> trunk.git/gcc/config/arm/arm_mve.h:13947:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
> trunk.git/gcc/config/arm/arm_mve.h:13957:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
> trunk.git/gcc/config/arm/arm_mve.h:13967:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
> trunk.git/gcc/config/arm/arm_mve.h:13977:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]

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

end of thread, other threads:[~2020-04-03 15:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25  7:19 [Bug target/94317] New: gcc/config/arm/arm_mve.h:13907: strange assignment ? dcb314 at hotmail dot com
2020-03-25  7:43 ` [Bug target/94317] " dcb314 at hotmail dot com
2020-03-25 10:18 ` marxin at gcc dot gnu.org
2020-03-25 12:58 ` srinath.parvathaneni at arm dot com
2020-03-25 13:01 ` marxin at gcc dot gnu.org
2020-03-25 13:01 ` marxin at gcc dot gnu.org
2020-03-25 14:38 ` dcb314 at hotmail dot com
2020-03-25 14:45 ` clyon at gcc dot gnu.org
2020-03-25 15:11 ` dcb314 at hotmail dot com
2020-03-25 15:14 ` sripar01 at gcc dot gnu.org
2020-04-02  9:57 ` cvs-commit at gcc dot gnu.org
2020-04-03 15:21 ` sripar01 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).