From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D9EF93856DC4; Fri, 21 Oct 2022 08:01:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9EF93856DC4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666339299; bh=+7Xv3HpXeox1aJ60QUhhqTsD+Eg1yq5gRn4XD5UZKrw=; h=From:To:Subject:Date:From; b=aROUFU/swUOjhqvY9gI7YEbAKIv1iMCkZVd00GJF8vU4WL2MkOwQ1T7oWR7dRmIGY ocT25iR4jf2Te7MKmHZnRpJdgntIHMXygHayPgxzKpbUJCXxNY/Xfnf4d8PHuVEoHC UNzI7LwvQvUosbbY/PjOcqf3+XmVyD7994bOr9D4= From: "yangwang at nj dot iscas.ac.cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107341] New: RISCV User Stack Frame error with -fno-omit-frame-pointer on GCC 10.2.0 Date: Fri, 21 Oct 2022 08:01:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yangwang at nj dot iscas.ac.cn X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107341 Bug ID: 107341 Summary: RISCV User Stack Frame error with -fno-omit-frame-pointer on GCC 10.2.0 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: yangwang at nj dot iscas.ac.cn Target Milestone: --- Created attachment 53741 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53741&action=3Dedit C source code gcc version 10.2.0 (SiFive GCC-Metal 10.2.0-2020.12.8) 1.compile test.c code riscv64-unknown-elf-gcc -static -O0 -g -fno-omit-frame-pointer test.c -o te= st -lm 2.Using perf record sudo perf record -e cpu-clock -g ./test 3.Using perf script sudo perf script > test.perf at test.perf, you will find that normal_loop call normal_loop test 769 22186.901402: 250000 cpu-clock:=20 1018a normal_loop+0x34 (/home/test) 1019c normal_loop+0x46 (/home/test) 10104 _start+0x40 (/home/test)=