Berwyn, The SIGSEGV sure looks like a bug but the user mailing list is no bug tracker. Your bug report is bound to be forgotten. If you think you've found a bug please report it on the SDCC Bug tracker on sourceforge.
Evelyn warns you that it identified some code where it could predict the outcome of a condition and removed the unreachable code snippet. These kind of constructs have a high risk of being not what the programmer intended. E.g. if (i=0) return n; instead of if (i==0) return n; Greets, Maarten > > Hi Vaclav. I think you are agreeing its an SDCC bug causing the crash, but > that there is a > workaround to the crash. > > But I still don't understand the warnings. Why does SDCC think the auto > variable is used before > initializataion, and why is Evelyn the modified dog complaining about control > flow? > > You are right that SDCC optimizes the code, and that is exactly what I want > (there is actually a > practical but more complicated use of this which I can share if you want it). > > - Berwyn > > Vaclav Peroutka wrote: > Hello, > > if you use some intermediate variable (for example int a2; a2 = n; ) > then you get "warning 84: 'auto' variable 'a2' may be used before > initialization". > > But the compiler does not crash. > > Anyway it looks like SDCC bug message because function is run only > with some parameter. ASM code looks created crrectly. > > Vaclav > > ------------ Puvodní zpráva ------------ > Od: Berwyn Hoyt <[EMAIL PROTECTED]> > Predmet: [Sdcc-user] SDCC bug? > Datum: 05.2.2008 03:29:56 > --------------------------------------------- > Hi folks, > > I have hit an SDCC seg fault. I have reduced the issue to a very > minimal test file as follows: > > > sdcc test.c > > "t.c:6: warning 110: conditional flow changed by optimizer: so said > EVELYN the modified DOG > t.c:6: warning 84: 'auto' variable '(null)' may be used before > initialization > Caught signal 11: SIGSEGV > " > The test.c file is as follows: > "int main(int n) { > int i=0; > > if (i!=0) return n; > return 0; > } > " Any ideas? > > > > > -- > > Berwyn Hoyt, Senior Hardware Engineer: [EMAIL PROTECTED] > Ph: +64 3 359 2101; Mobile: +64 21 045 7830 > Brush Technology: www.brush.co.nz > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user