Compiler crash with block numbers

2012-09-20 Thread Ian Lance Taylor
Hi Dehao, I suspect that your recent patch changing block handling has broken bootstrap with --enable-languages=go. I reduced the test case to this C++ code: #include string std::string f(bool is_string, bool is_constant) { if (is_string) { std::string left_string; std::string

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
Sure, I'll look into this problem today. Thanks, Dehao On Fri, Sep 21, 2012 at 2:25 AM, Ian Lance Taylor i...@google.com wrote: Hi Dehao, I suspect that your recent patch changing block handling has broken bootstrap with --enable-languages=go. I reduced the test case to this C++ code:

Re: Compiler crash with block numbers

2012-09-20 Thread H.J. Lu
On Thu, Sep 20, 2012 at 11:46 AM, Dehao Chen de...@google.com wrote: Sure, I'll look into this problem today. Thanks, Dehao On Fri, Sep 21, 2012 at 2:25 AM, Ian Lance Taylor i...@google.com wrote: Hi Dehao, I suspect that your recent patch changing block handling has broken bootstrap with

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
The bug is in tree-eh.c. IS_UNKNOWN_LOCATION is mistakenly used, thus the block info for a call stmt is cleared. A patch to fix the problem is atached: gcc/ChangeLog: tree-eh.c (lower_try_finally_dup_block): Use correct way to check unknown location. Index: tree-eh.c

Re: Compiler crash with block numbers

2012-09-20 Thread Ian Lance Taylor
On Thu, Sep 20, 2012 at 12:59 PM, Dehao Chen de...@google.com wrote: The bug is in tree-eh.c. IS_UNKNOWN_LOCATION is mistakenly used, thus the block info for a call stmt is cleared. A patch to fix the problem is atached: gcc/ChangeLog: tree-eh.c (lower_try_finally_dup_block): Use

Re: Compiler crash with block numbers

2012-09-20 Thread Ian Lance Taylor
On Thu, Sep 20, 2012 at 12:59 PM, Dehao Chen de...@google.com wrote: gcc/ChangeLog: tree-eh.c (lower_try_finally_dup_block): Use correct way to check unknown location. While you think about my questions, let's fix the bootstrap. This patch is OK if it passes bootstrap and a gcc and

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
IS_UNKNOWN_LOCATION checks if the source location is unknown. == UNKNONW_LOCATION checks if source location is unknown and the block is NULL. Yes, they are error-prone, I'll have a separate patch to clean up IS_UNKNOWN_LOCATION later. On Fri, Sep 21, 2012 at 4:17 AM, Ian Lance Taylor

Re: Compiler crash with block numbers

2012-09-20 Thread Dehao Chen
Hi, Ian, This patch fixed the bootstrap problem, as well as the problem posted in http://gcc.gnu.org/ml/gcc-patches/2012-09/msg01441.html However, the libstdc++ problem is not fixed, they are related to the my line_table implementation for PCH. I'll send another patch later for that. Shall I