Files
RedBear-OS/recipes/tools/gnu-binutils/source/ld/testsuite/ld-elf/dl5.cc
T
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

55 lines
664 B
C++

#include <stdio.h>
#include <stdlib.h>
#include <new>
#include "dl5.h"
int pass = 0;
void *
operator new (size_t sz, const std::nothrow_t&) throw ()
{
void *p;
pass++;
p = malloc(sz);
return p;
}
void *
operator new (size_t sz) throw (std::bad_alloc)
{
void *p;
pass++;
p = malloc(sz);
return p;
}
void
operator delete (void *ptr) throw ()
{
pass++;
if (ptr)
free (ptr);
}
int
main (void)
{
A *bb = new A[10];
foo (bb);
delete [] bb;
bb = new (std::nothrow) A [10];
foo (bb);
delete [] bb;
if (pass == 4)
{
printf ("PASS\n");
return 0;
}
else
{
printf ("FAIL\n");
return 1;
}
}