> asm-c-connect-test pass if the initial compiler is tcc 32 or 64 (and building tcc 32/64 respectively).
> It segfaults if the initial compiler is gcc 64 (mingw gcc 7.2.0, in msys2 setup).
> I didn't test with gcc 32 mingw.
you mean the compiler by which tcc itself is compiled? I.e. there is a
vs. with tcc (the resulting tcc produces good code)?
Hmpf.
obvious, but I can't test win32/64.
Michael.
> When it passes, this is what it prints:------------ asm-c-connect-test ------------
> ./asm-c-connect
> x1
> x2
> x3
> And when it fails:../tcc.exe -B../../win32 -I../../include -I../.. -I.. -L.. -o asm-c-connect.exe ../../tests/asm-c-connect-1.c ../../tests/asm-c-connect-2.c
> ------------ asm-c-connect-test ------------
> ./asm-c-connect.exe
> make[1]: *** [Makefile:240: asm-c-connect-test] Segmentation fault
> make[1]: Leaving directory '<tcc-root>/bld/tests'
> make: *** [Makefile:346: test] Error 2
>
>
> On Wednesday, November 22, 2017 7:11 PM, Michael Matz <
address@hidden> wrote:
>
>
> Hi,
>
> On Mon, 20 Nov 2017, Michael Matz wrote:
>
> > > naively I'd think that it probably should more closely emulate the gcc
> > > situation where inline asm ends up just as embedded snippets in its C ->
> > > asm output. Which could mean for example that "free_asm_labels" should
> > > be called only once at the end of each "translation unit" (file).
> >
> > Yes, that would be the ultimate goal. As said, this would elevate the
> > problem of sharing C-label and asm-label namespace, which already is a
> > problem right now, even more. So that needs solving, preferably without
> > needing too much additional memory, then the move to a single end-of-file
> > free_asm_labels, and then all is sunny :)
> >
> > > Below is some test that I just have tried.
> >
> > Yep, a conscise example of all asm- symbol table problems we have right
> > now :)
>
> I've fixed the problems I know about, including this two-file testcase
> (I've added it to the testsuite, I hope it also works on win32 and win64,
> which I haven't tested).
>
> After release I'm probably going to change how the asm symtable is
> implemented, which then does away with the new slot in TokenSym. My idea
> is to have just a single sym table for global decls, the C one, which can
> be used for the asm one as well, with some slight adjustments.
>
> But as is, it at least fixes the testcase, the linux-2.4.x 32bit kernel,
> and 64bit linux 4.6, so I'm happy enough for now :)
>
>
> Ciao,
> Michael.
>
> _______________________________________________
> Tinycc-devel mailing list
>
address@hidden>
https://lists.nongnu.org/mailman/listinfo/tinycc-devel>
>
>