Re: [PATCH] Do not change scope for unknown locations

2012-11-05 Thread Eric Botcazou
> Because we do want location and its block to be tightly coupled. I may > want to add an assertion that if location is known, the block should > *not* be NULL. Yes, that would be a first step towards always continuing. But that's 4.9 material, let's install the posted patch as-is for 4.8. --

Re: [PATCH] Do not change scope for unknown locations

2012-11-05 Thread Dehao Chen
> OK, thanks. What happens if you go one step farther and always continue? Because we do want location and its block to be tightly coupled. I may want to add an assertion that if location is known, the block should *not* be NULL. Dehao > > -- > Eric Botcazou

Re: [PATCH] Do not change scope for unknown locations

2012-11-05 Thread Eric Botcazou
> As Richard suggested, if a location is UNKNOWN_LOCATION, instead of > change_scope to DECL_INITIAL (cfun->decl), we should let it inherit > location from its previous instructions. This is implemented in the > attached patch. > > Bootstrapped and passed gcc regression tests and gdb regression te

[PATCH] Do not change scope for unknown locations

2012-11-02 Thread Dehao Chen
Hi, As Richard suggested, if a location is UNKNOWN_LOCATION, instead of change_scope to DECL_INITIAL (cfun->decl), we should let it inherit location from its previous instructions. This is implemented in the attached patch. Bootstrapped and passed gcc regression tests and gdb regression tests. I