public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/64421] New: Incorrect vector function name generated for log
@ 2014-12-27 21:47 andrew.n.senkevich at gmail dot com
  2015-01-23 15:24 ` [Bug tree-optimization/64421] " andrew.n.senkevich at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: andrew.n.senkevich at gmail dot com @ 2014-12-27 21:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64421

            Bug ID: 64421
           Summary: Incorrect vector function name generated for log
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andrew.n.senkevich at gmail dot com

Created attachment 34340
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34340&action=edit
reduced test

Hi,

compilation failed with the following code in log.c:
#include <math.h>

#pragma omp declare simd notinbranch simdlen(2)
extern double log (double);

int N = 3200;
double b[3200];
double a[3200];

int main (void)
{
  int i;

#pragma omp simd
  for (i = 0; i < N; i += 1)
  {
    b[i] = log (a[i]);
  }

  return (0);
}

gcc log.c -fopenmp -ffast-math -O1
/tmp/ccjc6yPN.s: Assembler messages:
/tmp/ccjc6yPN.s:37: Error: invalid operands (*UND* and *UND* sections) for `*'

gcc log.c -fopenmp -ffast-math -O1 -S
cat log.s
. . . . .
        call    _ZGVbN2v_*__log_finite
. . . . .

It seems because of wrong asm keyword handling, reduced test is:
#pragma omp declare simd notinbranch simdlen(2)
extern double log (double) __asm__ ("" "__log_finite") __attribute__
((__nothrow__ , __leaf__));

int N = 3200;
double b[3200];
double a[3200];

int main (void)
{
  int i;

#pragma omp simd
  for (i = 0; i < N; i += 1)
  {
    b[i] = log (a[i]);
  }

  return (0);
}

gcc -v
. . . . .
Target: x86_64-unknown-linux-gnu
. . . . .
gcc version 5.0.0 20141226 (experimental) (GCC)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-02-01 17:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-27 21:47 [Bug tree-optimization/64421] New: Incorrect vector function name generated for log andrew.n.senkevich at gmail dot com
2015-01-23 15:24 ` [Bug tree-optimization/64421] " andrew.n.senkevich at gmail dot com
2015-01-26 12:52 ` [Bug middle-end/64421] " jakub at gcc dot gnu.org
2015-01-26 21:29 ` jakub at gcc dot gnu.org
2015-01-26 21:34 ` jakub at gcc dot gnu.org
2015-01-27 15:11 ` andrew.n.senkevich at gmail dot com
2015-02-01 17:35 ` jakub at gcc dot gnu.org

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 read-only IMAP folder(s) and NNTP newsgroup(s).