This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Outwit compiler dead code elimination in break.exp test


> I know that GCC will now, when -O is specified, inline (and thence 
> eliminate) pure functions.  However, I don't think that should occure 
> when -O isn't specified.

It doesn't.  The gdb specifically uses optimization for the test that
is currently failing:

  FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file

> As for stopping GCC from eliminating code - last time this came up (ref 
> store.exp) it was recommended that the .c files be split so that GCC 
> couldn't see the potential optimization.

If that is the prefered solution, I can rework the patch.

-Fred


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]