This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH AArch64/V3]Add new patterns for vcond_mask and vec_cmp
On Thu, Aug 11, 2016 at 8:08 AM, Andreas Schwab <schwab@suse.de> wrote:
> ../../gcc/config/aarch64/aarch64-simd.md: In function 'rtx_def* gen_vec_cmpv2sfv2si(rtx, rtx, rtx, rtx)':
> ../../gcc/config/aarch64/aarch64-simd.md:2498:17: error: 'comparison' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> emit_insn (comparison (operands[0], operands[2], operands[3]));
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../gcc/config/aarch64/aarch64-simd.md:2416:9: note: 'comparison' was declared here
> rtx (*comparison) (rtx, rtx, rtx);
> ^~~~~~~~~~
> ../../gcc/config/aarch64/aarch64-simd.md: In function 'rtx_def* gen_vec_cmpv4sfv4si(rtx, rtx, rtx, rtx)':
> ../../gcc/config/aarch64/aarch64-simd.md:2498:17: error: 'comparison' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> emit_insn (comparison (operands[0], operands[2], operands[3]));
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../gcc/config/aarch64/aarch64-simd.md:2416:9: note: 'comparison' was declared here
> rtx (*comparison) (rtx, rtx, rtx);
> ^~~~~~~~~~
> ../../gcc/config/aarch64/aarch64-simd.md: In function 'rtx_def* gen_vec_cmpv2dfv2di(rtx, rtx, rtx, rtx)':
> ../../gcc/config/aarch64/aarch64-simd.md:2498:17: error: 'comparison' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> emit_insn (comparison (operands[0], operands[2], operands[3]));
> ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../gcc/config/aarch64/aarch64-simd.md:2416:9: note: 'comparison' was declared here
> rtx (*comparison) (rtx, rtx, rtx);
> ^~~~~~~~~~
Hi Andreas,
Thanks very much for reporting this.
I also got below error messages:
../../gcc/gcc/config/aarch64/aarch64-simd.md: In function ‘rtx_def*
gen_vcondv8qiv8qi(rtx, rtx, rtx, rtx, rtx, rtx)’:
../../gcc/gcc/config/aarch64/aarch64-simd.md:2574:17: error: unused
variable ‘code’ [-Werror=unused-variable]
enum rtx_code code = GET_CODE (operands[3]);
^~~~
../../gcc/gcc/config/aarch64/aarch64-simd.md: In function ‘rtx_def*
gen_vcondv16qiv16qi(rtx, rtx, rtx, rtx, rtx, rtx)’:
../../gcc/gcc/config/aarch64/aarch64-simd.md:2574:17: error: unused
variable ‘code’ [-Werror=unused-variable]
enum rtx_code code = GET_CODE (operands[3]);
^~~~
../../gcc/gcc/config/aarch64/aarch64-simd.md: In function ‘rtx_def*
gen_vcondv4hiv4hi(rtx, rtx, rtx, rtx, rtx, rtx)’:
../../gcc/gcc/config/aarch64/aarch64-simd.md:2574:17: error: unused
variable ‘code’ [-Werror=unused-variable]
enum rtx_code code = GET_CODE (operands[3]);
^~~~
My bad forgetting to remove this when separating the patch set, the
following patch
@https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00842.html will fix
this.
For the reported error message, I think it's a bug in
maybe-unintialized warning, because all uses of "comparison" are
initialized in the previous switch statement. I will initialize it
explicitly, also file a PR for recording.
Thanks,
bin
>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."