<div dir="ltr">I've come around and believe #3 is the right answer. Better yet, we should give a way to specify the section attributes somewhere explicitly and only infer them as a fallback.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 7:45 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 15 September 2013 21:40, David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:<br>
> What do we expect from the following IR?<br>
><br>
> @i2 = constant i32 30, section "INITDATA", align 4<br>
> @i1 = global i32 0, section "INITDATA", align 4<br>
><br>
> Currently, we stick them in one section that isn't writable which is<br>
> problematic because @i1 is writable. If you flip @i1 and @i2 you get one<br>
> section which is writable.<br>
><br>
> It seems like we should do one of the following:<br>
> 1. Two sections, one writable + one that isn't<br>
> 2. One section that is writable<br>
> 3. Give an error<br>
><br>
> Personally, I like #1 or #2.<br>
<br>
</div></div>Why not #3? It the frontend wants a constant section it can print @i1<br>
differently. It if wants a writable section it can print @i2<br>
differently.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>