mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com, Alba Pompeo <albapompeo@gmail.com>
Subject: Re: Re: Julia on musl libc systems
Date: Sun, 31 Jan 2016 21:42:22 +0100	[thread overview]
Message-ID: <20160131204222.GB9621@port70.net> (raw)
In-Reply-To: <20160131204050.GA9621@port70.net>

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

* Szabolcs Nagy <nsz@port70.net> [2016-01-31 21:40:50 +0100]:
> * Rich Felker <dalias@libc.org> [2016-01-31 13:45:50 -0500]:
> > Are they perhaps using C++ and precompiled headers? The latter are
> 
> no, a reduced test case is attached

now really

> gcc -O3 bug.c
> 
> fails, but
> 
> gcc -O3 -fno-tree-slp-vectorize bug.c
> 
> passes, so CFLAGS+=-fno-tree-slp-vectorize is a
> workaround.
> 
> probably related to
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68517
> (although i dont see 0 sized structs here),
> but i could not reproduce it with another toolchain,
> only with the alpine x86_64 gcc-5.3.0 one.

[-- Attachment #2: bug.c --]
[-- Type: text/x-csrc, Size: 2804 bytes --]

typedef unsigned long size_t;
typedef struct cholmod_common_struct {
  struct cholmod_method_struct {
    int a;
  } method[9 + 1];
} cholmod_common;
typedef struct cholmod_sparse_struct {
  int a;
} cholmod_sparse;
typedef struct cholmod_descendant_score_t {
  int a;
} descendantScore;
typedef struct cholmod_factor_struct {
  int a;
} cholmod_factor;
typedef struct cholmod_dense_struct {
  int a;
} cholmod_dense;
typedef struct Path_struct { int rank; } Path_type;
static void updown_8_4(int update, int j, int e, double Alpha[], double W[],
                       cholmod_factor *L, cholmod_common *Common) {
  double G0[4], G1[4], G2[4], G3[4];
  double Z0[4], Z1[4], Z2[4], Z3[4];
  double *W0, *W1, *W2, *W3, *Lx;
  int *Li, *Lp, *Lnz;
  int j1, j2, j3, p0, p1, p2, p3, parent, lnz, pend, k;
  for (; j <= e; j = parent) {
    {
      if ((j2 <= e) && (lnz == Lnz[j3] + 3)) {
        {
          double lx[2][2], w[2], *w0, *w1;
          lx[0][0] = Lx[p0];
          lx[1][0] = Lx[p0 + 1];
          lx[0][1] = Lx[p1];
          lx[1][1] = Lx[p1 + 1];
          lx[1][1] -= G1[1] * w[1];
          w[0] = w0[2] - Z0[2] * lx[0][0];
          w[1] = w1[2] - Z0[2] * lx[1][0];
          lx[0][0] -= G0[2] * w[0];
          lx[1][0] -= G0[2] * w[1];
          w0[2] = w[0] -= Z1[2] * lx[0][1];
          w1[2] = w[1] -= Z1[2] * lx[1][1];
          lx[0][1] -= G1[2] * w[0];
          Lx[p0] = lx[0][0];
          Lx[p0 + 1] = lx[1][0];
          Lx[p1] = lx[0][1];
          Lx[p1 + 1] = lx[1][1];
        }
      }
    }
  }
}
static void updown_8_r(int update, cholmod_sparse *C, int rank,
                       cholmod_factor *L, double W[], Path_type Path[],
                       int npaths, int mask[], int maskmark,
                       cholmod_common *Common) {
  double *Cx, *Wpath, *W1, *a;
  int i, j, p, ccol, pend, wfirst, e, path=0, packed;
  {
    switch (Path[path].rank) {
    case 1:
      updown_8_4(update, j, e, a, W1, L, Common);
    }
  }
}
int cholmod_updown_mask2(int update, cholmod_sparse *C, int *colmark, int *mask,
                         int maskmark, cholmod_factor *L, cholmod_dense *X,
                         cholmod_dense *DeltaB, cholmod_common *Common) {
  double *Lx, *W=0, *Xx, *Nx;
  Path_type OrderedPath[32], Path[32];
  int n, wdim, k1, k2, npaths=0, i, j, row, packed, ccol, p, cncol, do_solve, k=0,
      botrow;
  updown_8_r(update, C, k, L, W, OrderedPath, npaths, mask, maskmark,
             Common);
  return 0;
}
int cholmod_updown_mark(int update, cholmod_sparse *C, int *colmark,
                        cholmod_factor *L, cholmod_dense *X,
                        cholmod_dense *DeltaB, cholmod_common *Common) {
  return (cholmod_updown_mask2(update, C, colmark, ((void *)0), 0, L, X, DeltaB,
                               Common));
}

  reply	other threads:[~2016-01-31 20:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJDAfTAwqGWWn3hx8k4jbynAgsy=Q8GHmccOod-xmZ87327z+A@mail.gmail.com>
     [not found] ` <20160130130956.GR9621@port70.net>
     [not found]   ` <CAJDAfTAyYz8Xnwv3Xj_qTxM_AErVjfRUPymffExTZ4KN-_eV5g@mail.gmail.com>
     [not found]     ` <20160130144011.GS9621@port70.net>
     [not found]       ` <CAJDAfTAkMDEc4s2tZQJPW0WDhvSCfgNGDEVPAh+Xd+5YB4_K4Q@mail.gmail.com>
     [not found]         ` <CAJDAfTASp=MXYur_pdA-MWS6LJThEgXa2wtGSDc+kE4kiYHyjA@mail.gmail.com>
     [not found]           ` <20160131010750.GT9621@port70.net>
     [not found]             ` <CAJDAfTBZHQ-3pEH4MA0epo_RTTajbV4ohZC06WohaffkLYeW3Q@mail.gmail.com>
2016-01-31 16:49               ` Szabolcs Nagy
2016-01-31 18:00                 ` Szabolcs Nagy
2016-01-31 18:45                   ` Rich Felker
2016-01-31 20:40                     ` Szabolcs Nagy
2016-01-31 20:42                       ` Szabolcs Nagy [this message]
2016-05-21 13:37                         ` Alba Pompeo
2016-06-08 22:00                           ` Alba Pompeo
2016-06-29 17:03                             ` Alexander Monakov
2016-07-12 22:47                               ` Alba Pompeo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160131204222.GB9621@port70.net \
    --to=nsz@port70.net \
    --cc=albapompeo@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).