Thread overview
[Bug 148] gcc inline asm instruction template must be a constant char string regression
Apr 11, 2015
Iain Buclaw
Feb 11, 2016
Iain Buclaw
Feb 11, 2016
Iain Buclaw
May 28, 2018
Iain Buclaw
Sep 01, 2018
Iain Buclaw
August 09, 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=148

art.08.09@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |art.08.09@gmail.com

--- Comment #1 from art.08.09@gmail.com ---
A slightly better testcase; this works when using the older compiler:

void main() {
   asm {""~"" ; }
   enum E = ""~"";
   asm {""~E~"" ; }
}

-- 
You are receiving this mail because:
You are watching all bug changes.


April 11, 2015
http://bugzilla.gdcproject.org/show_bug.cgi?id=148

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
The regression is now fixed:

https://github.com/D-Programming-GDC/GDC/commit/c76a734d3bf6db8120d4262fd2bba53c58174e29

I'm not sure about the enhancement, it requires that some semantic analysis that the parser is unable to distinguish.

-- 
You are receiving this mail because:
You are watching all bug changes.


February 11, 2016
http://bugzilla.gdcproject.org/show_bug.cgi?id=148

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
For resolving any kind of symbol to string via CTFE, I'd suggest we defer running semantic analysis until the second pass.

See for instance: https://github.com/D-Programming-Language/dmd/pull/5302/files#diff-0d13b271f20a2f0982c3c74062c314fdR440

-- 
You are receiving this mail because:
You are watching all bug changes.

February 11, 2016
http://bugzilla.gdcproject.org/show_bug.cgi?id=148

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Iain Buclaw from comment #3)
> For resolving any kind of symbol to string via CTFE, I'd suggest we defer running semantic analysis until the second pass.
> 
> See for instance: https://github.com/D-Programming-Language/dmd/pull/5302/files#diff- 0d13b271f20a2f0982c3c74062c314fdR440

Ah, it was much more trivial than that. ;-)

-    insn->ctfeInterpret();
+    insn = insn->ctfeInterpret();

Looks like the CTFE result is not stashed in all cases.

-- 
You are receiving this mail because:
You are watching all bug changes.

May 28, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=148

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |291


Referenced Bugs:

https://bugzilla.gdcproject.org/show_bug.cgi?id=291
[Bug 291] Compile-time AssemblerTemplate is not supported
-- 
You are receiving this mail because:
You are watching all bug changes.
September 01, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=148

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
As of: https://github.com/dlang/dmd/pull/8538

The parsing of the asm block has been moved to the semantic pass.

This now all works:

void main()
{
    asm { "" ~ ""; }
    enum E = ""~"";
    asm { E; }
    asm { ""~E~""; }
    asm { mixin(""~""); }
}

-- 
You are receiving this mail because:
You are watching all bug changes.