[Bug c/77750] New: gcc build not working with -O0
lkrupp at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 27 07:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77750
Bug ID: 77750
Summary: gcc build not working with -O0
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: lkrupp at gcc dot gnu.org
Target Milestone: ---
Created attachment 39694
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39694&action=edit
Possible patch (correctly formatted magic "fall through" comments)
Within the last day or so, building GCC with this command:
make BOOT_CFLAGS='-O0' CFLAGS_FOR_TARGET='-O0' CFLAGS_FOR_BUILD='-O0'
started failing with these warnings, which are treated as errors:
../../gcc_trunk/gcc/combine.c: In function 'rtx_code
simplify_compare_const(rtx_code, machine_mode, rtx, rtx_def**)':
../../gcc_trunk/gcc/combine.c:11364:7: error: this statement may fall through
[-Werror=implicit-fallthrough]
if (const_op > 0)
^~
../../gcc_trunk/gcc/combine.c:11373:5: note: here
case LE:
^~~~
../../gcc_trunk/gcc/combine.c:11393:7: error: this statement may fall through
[-Werror=implicit-fallthrough]
if (const_op > 0)
^~
../../gcc_trunk/gcc/combine.c:11402:5: note: here
case GT:
^~~~
../../gcc_trunk/gcc/combine.c: In function 'rtx_code
simplify_comparison(rtx_code, rtx_def**, rtx_def**)':
../../gcc_trunk/gcc/combine.c:11924:4: error: this statement may fall through
[-Werror=implicit-fallthrough]
if (subreg_lowpart_p (op0)
^~
../../gcc_trunk/gcc/combine.c:11932:2: note: here
case ZERO_EXTEND:
^~~~
../../gcc_trunk/gcc/combine.c:12340:6: error: this statement may fall through
[-Werror=implicit-fallthrough]
}
^
../../gcc_trunk/gcc/combine.c:12343:2: note: here
case LSHIFTRT:
^~~~
../../gcc_trunk/gcc/fold-const.c: In function 'tree_node*
extract_muldiv_1(tree, tree, tree_code, tree, bool*)':
../../gcc_trunk/gcc/fold-const.c:6276:7: error: this statement may fall through
[-Werror=implicit-fallthrough]
if ((code == TRUNC_MOD_EXPR || code == CEIL_MOD_EXPR
^~
../../gcc_trunk/gcc/fold-const.c:6289:5: note: here
case TRUNC_DIV_EXPR: case CEIL_DIV_EXPR: case FLOOR_DIV_EXPR:
^~~~
The build works without the '-O0' flags.
More information about the Gcc-bugs
mailing list