[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Re: optimizer removes volatile pin access code. why?
From: |
Erik Christiansen |
Subject: |
[avr-gcc-list] Re: optimizer removes volatile pin access code. why? |
Date: |
Thu, 29 Oct 2009 00:46:27 +1100 |
User-agent: |
Mutt/1.5.15+20070412 (2007-04-11) |
On Wed, Oct 28, 2009 at 02:08:05PM +0100, Joerg Desch wrote:
> I've played with "inline" and with "__attribute__((gnu_inline,
> always_inline))" to avoid this overhead, but it doesn't work as expected.
>
> #if defined(__GNUC__)
> # define ALLWAYS_INLINE inline __attribute__((gnu_inline, always_inline))
> #endif
> ALLWAYS_INLINE int foo (void)
> {
> // ...
> }
>
> I've tried it with -Os and foo() is still called.
Ah, yes, optimisation needs to be used for inline to work. If the above
fails on a small test case, "avr-gcc -v" and the command-line don't show
a lurking "-fno-inline", and "-Wall -Wextra" doesn't provide any clues
either, I'd pretty soon be tempted to report it as a bug, unless a magic
method is revealed on the list. You've probably tried other
optimisations? (Just in case the size optimisation is absolute in its
approach.)
> As you can see it receives in the list. But with 1/2 hour delay.
Oh goody, it works again! :-)
Erik
- [avr-gcc-list] optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/27
- Re: [avr-gcc-list] optimizer removes volatile pin access code. why?, Joerg Wunsch, 2009/10/27
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/28
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Desch, 2009/10/31
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?,
Erik Christiansen <=
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/28
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Stu Bell, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/29
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Stu Bell, 2009/10/30
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, df_welch, 2009/10/28
- [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, David Brown, 2009/10/29
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/29
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Erik Christiansen, 2009/10/29
- Re: [avr-gcc-list] Re: optimizer removes volatile pin access code. why?, Joerg Wunsch, 2009/10/31
- RE: [avr-gcc-list] Re: optimizer removes volatile pin access code.why?, Weddington, Eric, 2009/10/31