From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 285B9398784C; Wed, 11 Nov 2020 09:31:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 285B9398784C From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/30398] memmove for string operations Date: Wed, 11 Nov 2020 09:31:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2020 09:31:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D30398 Thomas Koenig changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Thomas Koenig --- This is what we generated now for program main character(len=3D1) :: s character(len=3D2) :: c s =3D 'a' c =3D repeat(s,2) call foo(c) end program main : ;; Function main (main, funcdef_no=3D1, decl_uid=3D3926, cgraph_uid=3D2, symbol_order=3D1) (executed once) __attribute__((externally_visible)) main (integer(kind=3D4) argc, character(kind=3D1) * * argv) { character(kind=3D1) c[1:2]; static integer(kind=3D4) options.3[7] =3D {2116, 4095, 0, 1, 1, 0, 31}; [local count: 1073741825]: _gfortran_set_args (argc_2(D), argv_3(D)); _gfortran_set_options (7, &options.3[0]); MEM [(c_char * {ref-all})&c] =3D 24929; foo (&c, 2); c =3D{v} {CLOBBER}; return 0; } So, everything that should be optimized is now optimized. Fixed.=