This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
Hi,
> >>> Any time in the future
> >>> we may add another optimization that changes the alignment of global
> >>> variables, and the problem will repeat (it seems even possible that some
> >>> change in as could expose this problem).
> >> crtstuff is something of a hack. It's a GNU C implementation of what is
> >> necessarily very low-level code. That's why I did suggest what I think
> >> is a better solution, with the long-term correctness properties you're
> >> looking for -- drop the C declarations of these arrays, and declare them
> >> at the assembly level.
> >
> > OK, I did not really follow your suggestion; could you please implement
> > this fix?
>
> I think it would be a better use of time to fix a serious bug in the
> compiler. But, I'm happy to try to explain the suggestion in more
> detail if you're excited about cleaning this up.
yes, please. I probably consider having a valid code in the compiler
much more important than you -- if we do not have a valid code in the
compiler, how can we ask other people to write a valid code? How would
you answer query of someone who copied this trick to his code and found
out that it does not work for him -- we always knew that this is an ugly
hack and that it cannot work, but we were too lazy to fix it?
Zdenek
- References:
- [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff
- Re: [patch, rfc] Semantics of attribute (aligned), misscompilation of crtstuff