Recent

Author Topic: Internal error 200612311 - even more rare  (Read 1710 times)

Fibonacci

  • Hero Member
  • *****
  • Posts: 612
  • Internal Error Hunter
Internal error 200612311 - even more rare
« on: February 22, 2024, 01:57:53 am »
I couldnt find ANY mention of this internal error. Winner! Do I get a prize for that?

Code: Pascal  [Select][+][-]
  1. program test;
  2.  
  3. generic procedure proc<T>(a: T; b: byte);
  4. begin
  5. end;
  6.  
  7. generic procedure proc<T>(a: T);
  8. begin
  9.   specialize proc<T>(a, 0); // project1.lpr(9,3) Error: Internal error 200612311
  10. end;
  11.  
  12. begin
  13. end.

Fibonacci

  • Hero Member
  • *****
  • Posts: 612
  • Internal Error Hunter
Re: Internal error 200612311 - even more rare
« Reply #1 on: February 22, 2024, 03:13:01 am »
Now 2014010312, but cant make a small reproducible example for this one... Generics related.
« Last Edit: February 22, 2024, 04:08:44 am by Fibonacci »

Fibonacci

  • Hero Member
  • *****
  • Posts: 612
  • Internal Error Hunter
Re: Internal error 200612311 - even more rare
« Reply #2 on: February 22, 2024, 04:00:29 am »
u.pas(3687,0) Error: Internal error 2021010301

WHAT... And these errors dont go away if doing a clean build, or removing whole "lib" folder. Its not easy to code in FPC %)
« Last Edit: February 22, 2024, 04:10:13 am by Fibonacci »

Fibonacci

  • Hero Member
  • *****
  • Posts: 612
  • Internal Error Hunter
Re: Internal error 200612311 - even more rare
« Reply #3 on: February 22, 2024, 04:05:14 am »
u.pas(1323,65529) Error: Compilation raised exception internally

You kids better dont play with generics.

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: Internal error 200612311 - even more rare
« Reply #4 on: February 22, 2024, 04:44:00 am »
I suppose you win the prize "You have found a bug to report"  8-)
Conscience is the debugger of the mind

TRon

  • Hero Member
  • *****
  • Posts: 3647
Re: Internal error 200612311 - even more rare
« Reply #5 on: February 22, 2024, 11:19:31 am »
@Fibonacci:
There is a simple solution to all these internal errors that you seem to be reporting lately ... simply do not write such code  :P

But in all seriousness, thank you for putting your mind to these things.

Is (or should) such use (the use of a constant) of generic specialization actually be allowed ? (I actually have no idea)
« Last Edit: February 22, 2024, 11:22:29 am by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Fibonacci

  • Hero Member
  • *****
  • Posts: 612
  • Internal Error Hunter
Re: Internal error 200612311 - even more rare
« Reply #6 on: February 22, 2024, 11:23:52 am »
I too have no idea. An issue has been created on gitlab, it will get fixed or proper error message will be added.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5759
  • Compiler Developer
Re: Internal error 200612311 - even more rare
« Reply #7 on: February 23, 2024, 10:39:40 pm »
Is (or should) such use (the use of a constant) of generic specialization actually be allowed ? (I actually have no idea)

That constant is not part of the specialization, it's simply a parameter to the specialized function.

(Though FPC 3.3.1 does support constants as generic parameters ;) )

Thaddy

  • Hero Member
  • *****
  • Posts: 16194
  • Censorship about opinions does not belong here.
Re: Internal error 200612311 - even more rare
« Reply #8 on: February 24, 2024, 07:30:59 am »
And it is a very nice feature!
If I smell bad code it usually is bad code and that includes my own code.

TRon

  • Hero Member
  • *****
  • Posts: 3647
Re: Internal error 200612311 - even more rare
« Reply #9 on: February 24, 2024, 11:29:30 am »
That constant is not part of the specialization, it's simply a parameter to the specialized function.
You are right. I completely misread the example  :-[

Quote
(Though FPC 3.3.1 does support constants as generic parameters ;) )
Drats.... another (new) thing to learn about.  ;)  (I did not know that was possible so thank you for the hint).
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018