On 9 October 2012 15:01, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > On Tue, Oct 9, 2012 at 4:47 AM, Philip Herron <redbrain@xxxxxxxxxxx> wrote: >> >> tree label_decl = create_artificial_label (UNKNOWN_LOCATION); > >> >> I can't see a good example on how to make an if statement hard to dig >> through front-end specifics. I wonder does this mean for every >> LABEL_EXPR it was DECL_CONTEXT(label) = current_fndecl? > > When you call create_artificial_label, it will set DECL_CONTEXT of the > new label to point to current_function_decl. So the simplest way to > get the right thing is to ensure that current_function_decl is correct > whenever you call create_artificial_label. > > Ian Think i might be getting i just tried: DECL_CONTEXT(label_entry_expr) = current_function_decl; DECL_CONTEXT(label_exit_expr) = current_function_decl; But i get: Program received signal SIGSEGV, Segmentation fault. 0x0848524c in var_map_base_init () I dont think i have debugging all turned on so i cant see whats going on yet. --Phil