[Issue 21492] betterC: TypeInfo is generated for code guarded by if(__ctfe)

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21492

--- Comment #1 from dave287...@gmail.com ---
The error message has been change to “uses the GC”, but still fails. Dead
branches like this should be pruned so that more things will work with betterC.

--


[Issue 21482] dynamic indexing into enum dynamic array at ctfe generates TypeInfo in betterC

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21482

dave287...@gmail.com changed:

   What|Removed |Added

   Hardware|x86_64  |All
 OS|Linux   |All

--


[Issue 20101] BetterC: Template instantiation in CTFE only context should skip codegen / nogc / ... Phases

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20101

Dlang Bot  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Dlang Bot  ---
dlang/dmd pull request #14789 "fix Issue 20101 - BetterC: Template
instantiation in CTFE only contex…" was merged into master:

- ab2a21273c951f050be7aef1a1981ff0aefc1bad by Walter Bright:
  fix Issue 20101 - BetterC: Template instantiation in CTFE only context should
skip codegen

https://github.com/dlang/dmd/pull/14789

--


[Issue 23604] New: iota's floating point implementation does not conform to documentation

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23604

  Issue ID: 23604
   Summary: iota's floating point implementation does not conform
to documentation
   Product: D
   Version: D2
  Hardware: x86_64
OS: Linux
Status: NEW
  Severity: normal
  Priority: P1
 Component: phobos
  Assignee: nob...@puremagic.com
  Reporter: acehr...@yahoo.com

The documentation at

  https://dlang.org/library/std/range/iota.html

currently states

   "The two-argument overloads have step = 1. If begin < end
&& step < 0 or begin > end && step > 0 or begin == end,
then an empty range is returned."

However, the implementation for floating point types does not match
documentation:

import std;

void test(T)() {
assert(iota(T(1), T(2), T(-1)).empty);
assert(iota(T(2), T(1)).empty);// By-default step==1
assert(iota(T(3), T(3)).empty);// By-default step==1
}

void main() {
test!int; // Produces empty ranges: GOOD
test!double;  // asserts:   BAD
}

See the following thread for further discussion:

  https://forum.dlang.org/thread/rdbvirgshewaujtss...@forum.dlang.org

--


[Issue 20101] BetterC: Template instantiation in CTFE only context should skip codegen / nogc / ... Phases

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20101

--- Comment #2 from Walter Bright  ---
Noting that this worked in the __traits(compiles,...) was the clue I needed.
Thanks!

--


[Issue 20101] BetterC: Template instantiation in CTFE only context should skip codegen / nogc / ... Phases

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20101

Dlang Bot  changed:

   What|Removed |Added

   Keywords||pull

--- Comment #1 from Dlang Bot  ---
@WalterBright created dlang/dmd pull request #14789 "fix Issue 20101 - BetterC:
Template instantiation in CTFE only contex…" fixing this issue:

- fix Issue 20101 - BetterC: Template instantiation in CTFE only context should
skip codegen

https://github.com/dlang/dmd/pull/14789

--


[Issue 23603] New: ICE out of memory when using -lowmem

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23603

  Issue ID: 23603
   Summary: ICE out of memory when using -lowmem
   Product: D
   Version: D2
  Hardware: x86
OS: Windows
Status: NEW
  Severity: critical
  Priority: P1
 Component: dmd
  Assignee: nob...@puremagic.com
  Reporter: basti...@veelo.net

The code below makes dmd throw an OutOfMemoryError when using the -lowmem
option.

main.d---
struct Array(T)
{
T[] _payload;

this(int b)
{
import std;
_payload.length = b;
}
}

struct A
{
ushort[131070] a;
}

auto data = Array!A(255);
--

Invocation:
c:\d\dmd.2.101.2.windows\dmd2\windows\bin\dmd.exe -lowmem -c main.d

Memory usage climbs to ca. 3.5 GB with lots of available RAM to spare before
giving up with:

---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the
reduction.
---
DMD v2.101.2-dirty
predefs   DigitalMars LittleEndian D_Version2 all Windows Win32
CRuntime_Microsoft CppRuntime_Microsoft D_InlineAsm D_InlineAsm_X86 X86 assert
D_PreConditions D_PostConditions D_Invariants D_ModuleInfo D_Exceptions
D_TypeInfo D_HardFloat
binaryc:\d\dmd.2.101.2.windows\dmd2\windows\bin\dmd.exe
version   v2.101.2-dirty
configc:\d\dmd.2.101.2.windows\dmd2\windows\bin\sc.ini
DFLAGS-Ic:\d\dmd.2.101.2.windows\dmd2\windows\bin\..\..\src\phobos
-Ic:\d\dmd.2.101.2.windows\dmd2\windows\bin\..\..\src\druntime\import
---

core.exception.OutOfMemoryError@core\lifetime.d(126): Memory allocation failed


Without the -lowmem option an equal amount of memory is consumed before
succeeding. We are however dependent on using -lowmem due to the size of the
code base that this test was reduced from.

--


[Issue 4236] 'out of memory' error compiling on windows

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4236

Bastiaan Veelo  changed:

   What|Removed |Added

 CC||basti...@veelo.net

--- Comment #2 from Bastiaan Veelo  ---
No, this is no longer an issue.

Tested with v2.099.1 on Windows 10.

dmd mkdata.d
mkdata.exe > data.d
dmd -c data.d

-- mkdata.d --
import std.stdio, std.conv;

void main()
{
writeln("module data;\n");
write("const ubyte[] blob = [0");
foreach (i; 1 .. 8_000_000)
write(", ", (i % ubyte.max).to!string);
writeln("];\n");
}

--


[Issue 23601] [std.format] acceptedSpecs do match baseOfSpec

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23601

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P3

--


[Issue 23602] Reimplement associative arrays on runtime

2023-01-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23602

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P4

--