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.tkac...@arm.com>

    * config/aarch64/aarch64.c (initialize_aarch64_code_model): Break
    after -mcmodel=large -fPIC sorry.
commit 227760c90ec4316193f5a4b8a11378faedb3e039
Author: Kyrylo Tkachov <kyrylo.tkac...@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 ();
 	 }

Reply via email to