setting a breakpoint on a break statement

2007-03-14 Thread Tristan Gingold
Hi, in some cases, a breakpoint can't be set on a continue or break statement. Here is a simple example: void foc (void) { int a, i; for (i = 1; i <= 10; i++) { if (i < 3) a = 1; else break; // line 9 a = 5; } } int main(void) { foc (); } The reason is quie

Re: setting a breakpoint on a break statement

2007-03-14 Thread Ian Lance Taylor
Tristan Gingold <[EMAIL PROTECTED]> writes: > in some cases, a breakpoint can't be set on a continue or break > statement. Here is a simple example: > The reason is quiet simple: even at -O0 -g, there is no insn (and no > BB) corresponding to the break/continue statement. > Here is a small patch

Re: setting a breakpoint on a break statement

2007-03-14 Thread Andrew Pinski
On 3/14/07, Tristan Gingold <[EMAIL PROTECTED]> wrote: Hi, in some cases, a breakpoint can't be set on a continue or break statement. Here is a simple example: I think this is also related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29609 Yes, yes I have the whole bugzilla memorized. :)

Re: setting a breakpoint on a break statement

2007-03-15 Thread Tristan Gingold
On Mar 14, 2007, at 3:16 PM, Ian Lance Taylor wrote: Tristan Gingold <[EMAIL PROTECTED]> writes: in some cases, a breakpoint can't be set on a continue or break statement. Here is a simple example: The reason is quiet simple: even at -O0 -g, there is no insn (and no BB) corresponding to t

Re: setting a breakpoint on a break statement

2007-03-15 Thread Ian Lance Taylor
Tristan Gingold <[EMAIL PROTECTED]> writes: > > I don't think it is appropriate to change the meaning of > > forwarder_block_p. And I'm not sure why you need that patch anyhow, > > considering the existing code in cleanup_tree_cfg_1. > Without that change, the rtl jump pass cleans the jump and al