[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 --- Comment #8 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick O'Neill : https://gcc.gnu.org/g:1e9180b3298def6c01d9055d558fdb52231f8d2d commit r13-7674-g1e9180b3298def6c01d9055d558fdb52231f8d2d Author: Martin Liska Date: Wed May 3 16:35:26 2023 +0200 riscv: fix error: control reaches end of non-void function Fixes: gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] 66 | [(set (attr "length") (const_int 4))]) | ^ PR target/109713 gcc/ChangeLog: * config/riscv/sync.md: Add gcc_unreachable to a switch.
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 Martin Liška changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Martin Liška --- Fixed now.
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 --- Comment #6 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:4bd434fbfc7865961a8e10d7e9601b28765ce7be commit r14-432-g4bd434fbfc7865961a8e10d7e9601b28765ce7be Author: Martin Liska Date: Wed May 3 16:35:26 2023 +0200 riscv: fix error: control reaches end of non-void function Fixes: gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] 66 | [(set (attr "length") (const_int 4))]) | ^ PR target/109713 gcc/ChangeLog: * config/riscv/sync.md: Add gcc_unreachable to a switch.
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 Richard Biener changed: What|Removed |Added Target Milestone|--- |14.0
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 --- Comment #5 from Jakub Jelinek --- Yes, preapproved.
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 --- Comment #4 from Martin Liška --- (In reply to Jakub Jelinek from comment #3) > 8 spaces -> tab. May I commit it as obvious with the change?
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- 8 spaces -> tab.
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 Martin Liška changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed||2023-05-03 Status|UNCONFIRMED |NEW
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 --- Comment #2 from Martin Liška --- So something like this can fix it: diff --git a/gcc/config/riscv/sync.md b/gcc/config/riscv/sync.md index ba132d8a1ce..206adcfec3c 100644 --- a/gcc/config/riscv/sync.md +++ b/gcc/config/riscv/sync.md @@ -61,6 +61,8 @@ (define_insn "mem_thread_fence_1" return "fence\tr,rw"; else if (model == MEMMODEL_RELEASE) return "fence\trw,w"; +else +gcc_unreachable (); } [(set (attr "length") (const_int 4))])
[Bug target/109713] [14 Regression] gcc/config/riscv/sync.md:66:1: error: control reaches end of non-void function [-Werror=return-type] since r14-406-gbff7c773864479
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109713 --- Comment #1 from Martin Liška --- The following generated code reports the warning: static const char * output_491 (rtx *operands ATTRIBUTE_UNUSED, rtx_insn *insn ATTRIBUTE_UNUSED) { #line 53 "/home/marxin/Programming/gcc/gcc/config/riscv/sync.md" { enum memmodel model = (enum memmodel) INTVAL (operands[1]); model = memmodel_base (model); if (model == MEMMODEL_SEQ_CST) return "fence\trw,rw"; else if (model == MEMMODEL_ACQ_REL) return "fence.tso"; else if (model == MEMMODEL_ACQUIRE) return "fence\tr,rw"; else if (model == MEMMODEL_RELEASE) return "fence\trw,w"; } }