This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][AArch64][committed] Do not ICE after apologising for -mcmodel=large -fPIC
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Aug 2015 15:37:04 +0100
- Subject: [PATCH][AArch64][committed] Do not ICE after apologising for -mcmodel=large -fPIC
- Authentication-results: sourceware.org; auth=none
Hi all,
If we try to compile a file with -mcmodel=large -fPIC we will emit a sorry in
initialize_aarch64_code_model because that
combination is not implemented. However, there is a missing break in that case
statement and we end up falling through to the gcc_unreachable and ICE'ing.
The right thing here is to break. The sorry () already suppresses generation of any
result so there's no risk of proceeding with wrong codegen.
Bootstrappped and tested on aarch64.
Applied as obvious with r226815.
Thanks,
Kyrill
2015-08-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (initialize_aarch64_code_model): Break
after -mcmodel=large -fPIC sorry.
commit 227760c90ec4316193f5a4b8a11378faedb3e039
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Mon Aug 10 16:09:14 2015 +0100
[AArch64] Do not ICE after apologising for -mcmodel=large -fPIC
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index e00a069..87ed777 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -7950,6 +7950,7 @@ initialize_aarch64_code_model (struct gcc_options *opts)
case AARCH64_CMODEL_LARGE:
sorry ("code model %qs with -f%s", "large",
opts->x_flag_pic > 1 ? "PIC" : "pic");
+ break;
default:
gcc_unreachable ();
}