https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117141
Bug ID: 117141 Summary: gcc/match.pd: patten duplicates around signed_integer_sat_sub Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed today that `gcc/match.pd` contains duplicate patterns. Build also complains about them on `x86_64-linux` as: build/genmatch --generic \ --header=tmp-generic-match-auto.h --include=generic-match-auto.h \ /home/slyfox/dev/git/gcc/gcc/match.pd tmp-generic-match-1.cc tmp-generic-match-2.cc tmp-generic-match-3.cc tmp-generic-match-4.cc tmp-generic-match-5.cc tmp-generic-match-6.cc tmp-generic-match-7.cc tmp-generic-match-8.cc tmp-generic-match-9.cc tmp-generic-match-10.cc /home/slyfox/dev/git/gcc/gcc/match.pd:3424:3 warning: duplicate pattern (cond^ (ne (imagpart (IFN_SUB_OVERFLOW:c@2 @0 @1)) integer_zerop) ^ /home/slyfox/dev/git/gcc/gcc/match.pd:3397:3 warning: previous pattern defined here (cond^ (ne (imagpart (IFN_SUB_OVERFLOW@2 @0 @1)) integer_zerop) ^ (COND_EXPR (NE_EXPR (IMAGPART_EXPR (CFN_SUB_OVERFLOW @0 @1)@2) integer_zerop) (BIT_XOR_EXPR (NEGATE_EXPR (CONVERT_EXPR (LT_EXPR @0 integer_zerop))) max_value) (REALPART_EXPR @2)) /home/slyfox/dev/git/gcc/gcc/match.pd:3424:3 warning: duplicate pattern (cond^ (ne (imagpart (IFN_SUB_OVERFLOW:c@2 @0 @1)) integer_zerop) ^ /home/slyfox/dev/git/gcc/gcc/match.pd:3397:3 warning: previous pattern defined here (cond^ (ne (imagpart (IFN_SUB_OVERFLOW@2 @0 @1)) integer_zerop) ^ (COND_EXPR (NE_EXPR (IMAGPART_EXPR (CFN_SUB_OVERFLOW @0 @1)@2) integer_zerop) (BIT_XOR_EXPR max_value (NEGATE_EXPR (CONVERT_EXPR (LT_EXPR @0 integer_zerop)))) (REALPART_EXPR @2)) $ gcc/xgcc -Bgcc -v Reading specs from gcc/specs COLLECT_GCC=gcc/xgcc COLLECT_LTO_WRAPPER=gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib --disable-bootstrap --disable-lto --disable-libsanitizer --disable-libstdcxx-pch --enable-languages=c,c++ --disable-libgomp --disable-libquadmath --disable-libvtv CFLAGS='-O1 -ggdb3' CXXFLAGS='-O1 -ggdb3' LDFLAGS='-O1 -ggdb3' Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20241014 (experimental) (GCC)