mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-10 11:23:15 +00:00
Workaround a problem with GCC 4.9 on x86_64 systems.
configure.ac: Apply the same workaround for a problem with GCC labels on x86_64 systems with GCC 4.9 as we do with GCC 4.8. (XXX we should probably disable -ftree-dominator-opts on all GCCs that support it, but I'm not sure how widespread the problem with it is -- I'll look into that separately.) runtime/mercury_stack_trace.c: Avoid a warning from GCC.
This commit is contained in:
@@ -2506,11 +2506,12 @@ case "$ac_cv_prog_gcc" in yes)
|
||||
CFLAGS_FOR_GOTOS="$CFLAGS_FOR_GOTOS -fomit-frame-pointer"
|
||||
;;
|
||||
i*86-*|x86_64*)
|
||||
# On x86-64 with GCC 4.8, gcc labels do not work correctly with
|
||||
# -ftree-dominator-opts -- we disable it for x86 in this case too.
|
||||
# On x86-64 with GCC 4.8 and 4.9 gcc labels do not work correctly
|
||||
# with -ftree-dominator-opts -- we disable it for x86 in this case
|
||||
# too.
|
||||
#
|
||||
case "$C_COMPILER_TYPE" in
|
||||
gcc_4_8_*)
|
||||
gcc_4_8_*|gcc_4_9_*)
|
||||
CFLAGS_FOR_GOTOS="$CFLAGS_FOR_GOTOS -fno-tree-dominator-opts"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1265,7 +1265,8 @@ MR_dump_nondet_stack_from_layout(FILE *fp,
|
||||
} else {
|
||||
frame_size = apparent_frame_size;
|
||||
MR_print_nondetstackptr(fp, base_maxfr);
|
||||
fprintf(fp, ": ordinary, %d words", frame_size);
|
||||
fprintf(fp, ": ordinary, %" MR_INTEGER_LENGTH_MODIFIER "d words",
|
||||
frame_size);
|
||||
if (print_vars && MR_find_matching_branch(base_maxfr, &branch)) {
|
||||
fprintf(fp, ", ");
|
||||
label_layout = MR_nondet_branch_infos[branch].branch_layout;
|
||||
|
||||
Reference in New Issue
Block a user